Datasets:

Modalities:
Text
Formats:
csv
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet
nl
stringlengths
15
184
bash
stringlengths
1
176
bash2
stringlengths
4
166
difficulty
int64
0
2
list files in the current directory
ls
ls -l
0
list all files in the current directory including hidden files
ls -a
ls -alh
0
list open files
lsof
lsof -P -i -n
0
create a copy of /testbed/hello.php named /testbed/hello-COPY.php
cp /testbed/hello.php /testbed/hello-COPY.php
cp /testbed/hello.php /testbed/hello-COPY.php -v
0
create a file /testbed/test.txt
touch /testbed/test.txt
> /testbed/test.txt
0
create a directory /testbed/test_dir
mkdir /testbed/test_dir
mkdir /testbed/test_dir -v
0
remove a file named does_not_exist.txt
rm does_not_exist.txt
unlink does_not_exist.txt
0
print hello world
echo hello world
echo -n 'hello world'
0
print the current working directory
pwd
pwd .
0
print the current date and time
date
date -R
0
print the current user
whoami
id -un
0
remove a directory named fake_dir
rmdir fake_dir
rm -r fake_dir
0
print the current shell
echo $0
echo $SHELL
0
print environment variables
env
printenv
0
print the current user's home directory
echo $HOME
echo ~
0
print the current user's path
echo $PATH
printenv PATH
0
display the contents of the setup_nl2b_fs_1.sh file
cat setup_nl2b_fs_1.sh
nl setup_nl2b_fs_1.sh
0
display the first 5 lines of the setup_nl2b_fs_1.sh file
head -n 5 setup_nl2b_fs_1.sh
sed -n '1,5p' setup_nl2b_fs_1.sh
0
display the last 5 lines of the setup_nl2b_fs_1.sh file
tail -n 5 setup_nl2b_fs_1.sh
tac setup_nl2b_fs_1.sh | head -n 5
0
print the tenth line of the setup_nl2b_fs_1.sh
sed -n 10p setup_nl2b_fs_1.sh
awk 'NR==10' setup_nl2b_fs_1.sh
0
print the path of the bash executable
which bash
type bash
0
display the shell history
history
history | cut -c 8-
0
print the system utilization stats
vmstat
vmstat -t
0
print the system uptime
uptime
uptime -p
0
print the system load averages
w
w -s
0
print running processes
ps
ps -e
0
print running processes in a tree format
pstree
pstree -p
0
print the system memory usage
free
free -h
0
print the system disk usage
df
df -h
0
print the kernel version
uname -a
uname -r
0
print the system hostname
hostname
hostname -f
0
print the system IP address
hostname -I
hostname -i
0
print the ip addresses of the system DNS servers
cat /etc/resolv.conf | grep nameserver
grep nameserver /etc/resolv.conf
0
display the network interfaces
ifconfig
ifconfig -a
0
display the routing table
route
route -n
0
show the last logged in users
last
last -a
0
print the last logged in users and show the full user and domain names
last -w
last -w -i
0
print the openssl version
openssl version
openssl version -a
0
base64 encode the string 'hello'
echo 'hello' | base64
echo 'hello' | openssl enc -base64
0
base64 decode the string 'aGVsbG8='
echo 'aGVsbG8=' | base64 -d
echo 'aGVsbG8=' | openssl enc -base64 -d
0
print lines containing 'console' in the file setup_nl2b_fs_1.sh
grep 'console' setup_nl2b_fs_1.sh
awk '/console/' setup_nl2b_fs_1.sh
0
list the stats and timestamps of the file setup_nl2b_fs_1.sh
stat setup_nl2b_fs_1.sh
stat -t setup_nl2b_fs_1.sh
0
gzip the file /testbed/hello.php keeping the original file
gzip -k /testbed/hello.php
gzip --keep /testbed/hello.php
0
tar the file /testbed/hello.php to /testbed/hello.tar
tar -cf /testbed/hello.tar /testbed/hello.php
tar -cvf /testbed/hello.tar /testbed/hello.php
0
show apt information about the curl package
apt show curl
apt-cache show curl
0
list background jobs
jobs
jobs -p
0
print the current terminal type
echo $TERM
printenv TERM
0
display the current process priority
nice
nice
0
display the pid of the current shell
echo $$
pidof bash
0
time how long it takes to run the command echo 'hello'
time echo 'hello'
time echo 'hello'
0
print the current user's groups
groups
groups
0
print the current user's id
id
id -u
0
list the cron tab
crontab -l
crontab -l
0
print the current user's umask
umask
umask -p
0
list cpu information
lscpu
cat /proc/cpuinfo
0
list memory information
lsmem
cat /proc/meminfo
0
print the installed ssh version
ssh -V
ssh -V
0
print the bash profile in the home directory
cat ~/.bashrc
nl ~/.bashrc
0
print the system's locale
locale
locale
0
list block devices
lsblk
lsblk -f
0
find all files larger than 100MB in the current dir
find . -size +100M -print
find . -size +100M
0
create a symbolic link to /testbed/hello.php named /testbed/link
ln -s /testbed/hello.php /testbed/link
ln -s /testbed/hello.php /testbed/link
0
change the ownership of /testbed/test.txt to user 'nobody'
chown nobody /testbed/test.txt
chown nobody /testbed/test.txt
0
change the group of /testbed/test.txt to group 'nogroup'
chgrp nogroup /testbed/test.txt
chgrp nogroup /testbed/test.txt
0
change permissions of /testbed/test.txt to read-only for everyone
chmod 444 /testbed/test.txt
chmod a=r /testbed/test.txt
0
count the lines, words, and characters in setup_nl2b_fs_1.sh
wc setup_nl2b_fs_1.sh
wc setup_nl2b_fs_1.sh
0
print the lines in setup_nl2b_fs_1.sh sorted alphabetically
sort setup_nl2b_fs_1.sh
sort setup_nl2b_fs_1.sh
0
print the unique lines in setup_nl2b_fs_1.sh
uniq setup_nl2b_fs_1.sh
uniq setup_nl2b_fs_1.sh
0
display network statistics
netstat --statistics
netstat -s
0
display network interfaces
netstat -i
netstat --interfaces
0
display a calendar for the next 3 months
cal -3
cal -3
0
show running daemons and services
service --status-all
service --status-all
0
print the system boot time
who -b
uptime -s
0
print current swap usage
swapon --show
free -h | grep Swap
0
print a list of active kernel parameters
sysctl -a
sysctl --all
0
list the installed software packages
dpkg --get-selections
apt list --installed
0
list available shells
cat /etc/shells
cat /etc/shells
0
list all users on the system
getent passwd
cat /etc/passwd
0
list all groups on the system
getent group
cat /etc/group
0
extract the filename from this path '/usr/local/bin/my_script.sh'
basename /usr/local/bin/my_script.sh
echo 'my_script.sh'
0
perform a dns lookup for google.com
nslookup google.com
dig google.com
0
extract the directory from this path '/usr/local/bin/my_script.sh'
dirname /usr/local/bin/my_script.sh
echo '/usr/local/bin/'
0
send the message 'System maintenance in 10 minutes!' to all logged in users
wall 'System maintenance in 10 minutes!'
echo 'System maintenance in 10 minutes!' | wall
0
print the file type of setup_nl2b_fs_1.sh
file setup_nl2b_fs_1.sh
file setup_nl2b_fs_1.sh
0
print the contents of setup_nl2b_fs_1.sh with lines wrapped to 40 characters
fold -w 40 setup_nl2b_fs_1.sh
fmt -w 40 setup_nl2b_fs_1.sh
0
print all system configuration variables
getconf -a
getconf -a
0
print the number of processors
nproc
nproc
0
print the max number of open file descriptors
ulimit -n
ulimit -n
0
print the max number of user processes
ulimit -u
ulimit -u
0
print the max cpu time
ulimit -t
prlimit --cpu
0
display the configured size of long integers
getconf LONG_BIT
getconf LONG_BIT
0
print the directory tree two levels deep
tree -L 2
find . -maxdepth 2 -print
0
print the number of times the word 'the' appears in setup_nl2b_fs_1.sh
grep -o 'the' setup_nl2b_fs_1.sh | wc -l
grep -o 'the' setup_nl2b_fs_1.sh | nl
0
print the number of files in the current directory
ls -a | wc -l
ls -al | wc -l
0
print first line of setup_nl2b_fs_1.sh
sed -n '1p' setup_nl2b_fs_1.sh
awk 'NR == 1 {print}' setup_nl2b_fs_1.sh
0
print the last line of setup_nl2b_fs_1.sh
sed -n '$p' setup_nl2b_fs_1.sh
awk 'END {print}' setup_nl2b_fs_1.sh
0
print lines 3 to 5 of setup_nl2b_fs_1.sh
sed -n '3,5p' setup_nl2b_fs_1.sh
awk 'NR >= 3 && NR <= 5 {print}' setup_nl2b_fs_1.sh
0
print every other line of setup_nl2b_fs_1.sh
sed -n '1~2p' setup_nl2b_fs_1.sh
awk 'NR % 2 == 1 {print}' setup_nl2b_fs_1.sh
0
print the number of words in setup_nl2b_fs_1.sh
wc -w setup_nl2b_fs_1.sh
awk '{ total += NF } END { print total }' setup_nl2b_fs_1.sh
0
find all empty files in the current directory, do not search sub directories
find . -maxdepth 1 -type f -empty
find . -maxdepth 1 -type f -empty -print
0
End of preview. Expand in Data Studio

Dataset Card for NL2SH-ALFA

This dataset is a collection of natural language (English) instructions and corresponding Bash commands for the task of natural language to Bash translation (NL2SH).

Dataset Details

Dataset Description

This dataset contains a test set of 600 manually verified instruction-command pairs, and a training set of 40,639 unverified pairs for the development and benchmarking of machine translation models. The creation of NL2SH-ALFA was motivated by the need for larger, more accurate NL2SH datasets. The associated InterCode-ALFA benchmark uses the NL2SH-ALFA test set. For more information, please refer to the paper.

Usage

Note, the config parameter, NOT the split parameter, selects the train/test data.

from datasets import load_dataset
train_dataset = load_dataset("westenfelder/NL2SH-ALFA", "train", split="train")
test_dataset = load_dataset("westenfelder/NL2SH-ALFA", "test", split="train")

Dataset Sources

Uses

Direct Use

This dataset is intended for training and evaluating NL2SH models.

Out-of-Scope Use

This dataset is not intended for natural languages other than English, scripting languages or than Bash, nor multi-line Bash scripts.

Dataset Structure

The training set contains two columns:

  • nl: string - natural language instruction
  • bash: string - Bash command

The test set contains four columns:

  • nl: string - natural language instruction
  • bash: string - Bash command
  • bash2: string - Bash command (alternative)
  • difficulty: int - difficulty level (0, 1, 2) corresponding to (easy, medium, hard)

Both sets are unordered.

Dataset Creation

Curation Rationale

The NL2SH-ALFA dataset was created to increase the amount of NL2SH training data and to address errors in the test sets of previous datasets.

Source Data

The dataset was produced by combining, deduplicating and filtering multiple datasets from previous work. Additionally, it includes instruction-command pairs scraped from the tldr-pages. Please refer to Section 4.1 of the paper for more information about data collection, processing and filtering.
Source datasets:

NL2SH-ALFA Dataset Creation

Bias, Risks, and Limitations

  • The number of commands for different utilities is imbalanced, with the most common command being find.
  • Since the training set is unverified, there is a risk it contains incorrect instruction-command pairs.
  • This dataset is not intended for multi-line Bash scripts.

Recommendations

  • Users are encouraged to filter or balance the utilities in the dataset according to their use case.
  • Models trained on this dataset may produce incorrect Bash commands, especially for uncommon utilities. Users are encouraged to verify translations.

Citation

BibTeX:

@misc{westenfelder2025llmsupportednaturallanguagebash,
      title={LLM-Supported Natural Language to Bash Translation}, 
      author={Finnian Westenfelder and Erik Hemberg and Miguel Tulla and Stephen Moskal and Una-May O'Reilly and Silviu Chiricescu},
      year={2025},
      eprint={2502.06858},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2502.06858}, 
}

Dataset Card Authors

Finn Westenfelder

Dataset Card Contact

Please email [email protected] or make a pull request.

Downloads last month
124

Models trained or fine-tuned on westenfelder/NL2SH-ALFA

Collection including westenfelder/NL2SH-ALFA