text large_stringlengths 242 1.17k | nl large_stringlengths 13 387 | bash large_stringlengths 1 715 | source large_stringclasses 3
values |
|---|---|---|---|
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find all the html files in current folder and replace some pattern in all these files<|im_end|>
<|im_start|>assistant
find -type f -name '*.ht... | find all the html files in current folder and replace some pattern in all these files | find -type f -name '*.htm' -printf '%P\0%f\0' | xargs -0 -n2 sh -c 'fil="${2/\.htm/}"; sed -i -e "s;<title>.*</title>;<title>$fil</title>;" $1' replace | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all *.txt files/directories under current directory and execute process_one for each of them<|im_end|>
<|im_start|>assistant
find . -name... | Find all *.txt files/directories under current directory and execute process_one for each of them | find . -name "*.txt -exec process_one {} ";" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show the sum of disk used by all the files that belong to the user "test1" in the entire file system<|im_end|>
<|im_start|>assistant
find / -u... | show the sum of disk used by all the files that belong to the user "test1" in the entire file system | find / -user test1 -exec du -sm {} \;|awk '{s+=$1}END{print s}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Format the contents of "[file]" in a neat table<|im_end|>
<|im_start|>assistant
column -t [file]<|im_end|> | Format the contents of "[file]" in a neat table | column -t [file] | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Display file.txt with lines numbered, and page interactively through the result.<|im_end|>
<|im_start|>assistant
less -N file.txt<|im_end|> | Display file.txt with lines numbered, and page interactively through the result. | less -N file.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all directories under /path/to/base/dir and change their permission to 755<|im_end|>
<|im_start|>assistant
chmod 755 $<|im_end|> | Find all directories under /path/to/base/dir and change their permission to 755 | chmod 755 $ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
send GET request to "http://testsite/api/" with header "Authorization: Token wef4fwef54te4t5teerdfgghrtgdg53" and format as json<|im_end|>
<|i... | send GET request to "http://testsite/api/" with header "Authorization: Token wef4fwef54te4t5teerdfgghrtgdg53" and format as json | curl -X GET -H "Authorization: Token wef4fwef54te4t5teerdfgghrtgdg53" http://testsite/api/ | python -mjson.tool | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
reverses order of lines in a.txt and saves them to b.txt<|im_end|>
<|im_start|>assistant
tac a.txt > b.txt<|im_end|> | reverses order of lines in a.txt and saves them to b.txt | tac a.txt > b.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all files on the system whose names are 'composer.json' and search them for "drush"<|im_end|>
<|im_start|>assistant
find / -name composer... | Find all files on the system whose names are 'composer.json' and search them for "drush" | find / -name composer.json -exec grep -n drush {} /dev/null \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Adds %Pathname% to the dirs stack .<|im_end|>
<|im_start|>assistant
pushd %Pathname%<|im_end|> | Adds %Pathname% to the dirs stack . | pushd %Pathname% | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print position number of day '9' in fourth line of calendar output for September, 2009.<|im_end|>
<|im_start|>assistant
cal 09 2009 | awk 'NR=... | Print position number of day '9' in fourth line of calendar output for September, 2009. | cal 09 2009 | awk 'NR==4{day="9"; col=index; print col }' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Starts 'chromium', storing user data in a newly created temporary folder.<|im_end|>
<|im_start|>assistant
(chromium --user-data-dir=$ &)<|im_e... | Starts 'chromium', storing user data in a newly created temporary folder. | (chromium --user-data-dir=$ &) | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all *.txt file and replace old word to new word with sed command<|im_end|>
<|im_start|>assistant
find . -type f -name "*.txt" -exec sed ... | Find all *.txt file and replace old word to new word with sed command | find . -type f -name "*.txt" -exec sed 's/TZ/MALAWI/g' {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system Kubernetes node status and logs any nodes that are in a not ready state.<|im_end|>
<|im_start|>assistant
... | Create a script that monitors system Kubernetes node status and logs any nodes that are in a not ready state. | #!/bin/bash
while true; do
kubectl get nodes --field-selector=status.conditions[type=Ready,status!=True]
sleep 600
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Replace ",," with ", ," in "$file" and display the "," delimited result as a table in "less" with a shift value of 5 and line numbers<|im_end|... | Replace ",," with ", ," in "$file" and display the "," delimited result as a table in "less" with a shift value of 5 and line numbers | cat "$file" | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Open all .c files in the current directory tree in the vim editor<|im_end|>
<|im_start|>assistant
find . -name "*.c" -print | vim -<|im_end|> | Open all .c files in the current directory tree in the vim editor | find . -name "*.c" -print | vim - | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
In a ssh session, set the variable 'user' to the last dot-separated number of the client's IP address.<|im_end|>
<|im_start|>assistant
export ... | In a ssh session, set the variable 'user' to the last dot-separated number of the client's IP address. | export user=`env|grep -i SSH_CLIENT|cut -d' ' -f1|cut -d'.' -f4` | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check if a file is setuid.<|im_end|>
<|im_start|>assistant
#!/bin/bash
file="/path/to/your/file.txt"
if [ -u "$file" ]; then
echo "$file... | Check if a file is setuid. | #!/bin/bash
file="/path/to/your/file.txt"
if [ -u "$file" ]; then
echo "$file is setuid"
else
echo "$file is not setuid"
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Rename all *.jpg files to *.jpg$.jpg files under ../<dirname> directory by appending the parent directory name at the beginning of their name... | Rename all *.jpg files to *.jpg$.jpg files under ../<dirname> directory by appending the parent directory name at the beginning of their names | find ../<dirname> -name '*.jpg' -exec sh -c 'mv "$0" "$(basename $)-${0%.JPG}$.jpg"' {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Unsets shell function 'z'.<|im_end|>
<|im_start|>assistant
unset -f z<|im_end|> | Unsets shell function 'z'. | unset -f z | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Save the full path of the current script into variable "THIS"<|im_end|>
<|im_start|>assistant
THIS=`readlink -f "${BASH_SOURCE[0]}" 2>/dev/nul... | Save the full path of the current script into variable "THIS" | THIS=`readlink -f "${BASH_SOURCE[0]}" 2>/dev/null||echo $0` | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
simulate a full login of user builder<|im_end|>
<|im_start|>assistant
su -l builder<|im_end|> | simulate a full login of user builder | su -l builder | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Reread user's .profile configuration file.<|im_end|>
<|im_start|>assistant
source ~/.profile<|im_end|> | Reread user's .profile configuration file. | source ~/.profile | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Display various information about process currently taking the most CPU time.<|im_end|>
<|im_start|>assistant
top -b -n1 | head -8 | tail -1 |... | Display various information about process currently taking the most CPU time. | top -b -n1 | head -8 | tail -1 | awk '{ printf "User: %s\nPID: %s\nCPU Usage: %s\nMEM Usage: %s\n", $2,$1,$9,$10 }' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
run command "command" as user username with a full login simulation<|im_end|>
<|im_start|>assistant
su - username command<|im_end|> | run command "command" as user username with a full login simulation | su - username command | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Get the list of files owned by <userid><|im_end|>
<|im_start|>assistant
find . -user <userid><|im_end|> | Get the list of files owned by <userid> | find . -user <userid> | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system root user sudo command usage and send an alert if any unauthorized sudo commands are executed with specific ... | Create a script to monitor system root user sudo command usage and send an alert if any unauthorized sudo commands are executed with specific options. | #!/bin/bash
sudo_logs="/var/log/auth.log"
unauthorized_sudo=$(grep -i 'sudo' $sudo_logs | grep -i 'not allowed' | grep -i 'root' | grep -i 'rm' | wc -l)
if [ "$unauthorized_sudo" -gt "0" ]; then
echo "Unauthorized sudo command usage by root with rm command detected." | mail -s "Root Unauthorized Sudo with rm Com... | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List all files in the current directory tree larger than 1000 kb<|im_end|>
<|im_start|>assistant
find . -size +1000k<|im_end|> | List all files in the current directory tree larger than 1000 kb | find . -size +1000k | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all executable files under the current directory and below<|im_end|>
<|im_start|>assistant
find . -perm /a=x<|im_end|> | Find all executable files under the current directory and below | find . -perm /a=x | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor FTP server status and send an alert if the server becomes unresponsive.<|im_end|>
<|im_start|>assistant
#!/bin/bash... | Create a script to monitor FTP server status and send an alert if the server becomes unresponsive. | #!/bin/bash
server_status=$(curl -s -o /dev/null -w "%{http_code}" ftp://localhost)
if [ "$server_status" != "200" ]; then
echo "FTP server is unresponsive." | mail -s "FTP Server Unresponsive Alert" user@example.com
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
search for all the files in the entire file system which have either suid or sgid bit enabled and find of diff of these files with the file "f... | search for all the files in the entire file system which have either suid or sgid bit enabled and find of diff of these files with the file "files.secure". | find / \ -print | diff - files.secure | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system CPU temperature and logs any temperature spikes.<|im_end|>
<|im_start|>assistant
#!/bin/bash
while true;... | Create a script that monitors system CPU temperature and logs any temperature spikes. | #!/bin/bash
while true; do
sensors | grep -A 0 'Core [0-9] Temp' | awk '{print $3}' | sed 's/+//g' | sed 's/°C//g' > /tmp/cpu_temp.txt
sleep 300
analyze_cpu_temp
sleep 300
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Save the user name of the current user to variable "me"<|im_end|>
<|im_start|>assistant
me="$"<|im_end|> | Save the user name of the current user to variable "me" | me="$" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the list of files with their sizes in a directory sorted by modification time.<|im_end|>
<|im_start|>assistant
#!/bin/bash
ls -lt /path... | Print the list of files with their sizes in a directory sorted by modification time. | #!/bin/bash
ls -lt /path/to/your/directory | awk '{print $5, $6, $7, $8, $9}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find files in the current directory tree whose names are of the form "cxx_data.txt" where xx is a number from 30 to 70<|im_end|>
<|im_start|>a... | Find files in the current directory tree whose names are of the form "cxx_data.txt" where xx is a number from 30 to 70 | find . -regextype posix-egrep -regex '.\*c.\*' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
replace "exp_to_find_for_replacement" with "exp_to_replace" for all the files in the current folder<|im_end|>
<|im_start|>assistant
find -name... | replace "exp_to_find_for_replacement" with "exp_to_replace" for all the files in the current folder | find -name ‘*exp_to_find_in_folders*’ -exec rename “s/exp_to_find_for_replacement/exp_to_replace/” {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search the current directory and all of its sub-directory for any PDF files being careful to prevent the shell from expanding "*" before it's... | Search the current directory and all of its sub-directory for any PDF files being careful to prevent the shell from expanding "*" before it's passed to find. | find . -name \*.pdf -print | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Gets IP address of 'eth0' network interface.<|im_end|>
<|im_start|>assistant
ifconfig eth0 | grep -oP '[^ ]+'<|im_end|> | Gets IP address of 'eth0' network interface. | ifconfig eth0 | grep -oP '[^ ]+' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List all broken symlinks under the current directory with info on whether the links exist or not<|im_end|>
<|im_start|>assistant
find -L . -ty... | List all broken symlinks under the current directory with info on whether the links exist or not | find -L . -type l |xargs symlinks | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
search for all the ".pyc" files inthe current folder and remove them<|im_end|>
<|im_start|>assistant
find . -name "*.pyc" | xargs -i rm '{}<|i... | search for all the ".pyc" files inthe current folder and remove them | find . -name "*.pyc" | xargs -i rm '{} | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Delete newlines from output of 'hg st -R "$path"' and save to variable "var"<|im_end|>
<|im_start|>assistant
var=`hg st -R "$path" | tr -d '\n... | Delete newlines from output of 'hg st -R "$path"' and save to variable "var" | var=`hg st -R "$path" | tr -d '\n'` | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search the current directory recursively for files containing "needle text"<|im_end|>
<|im_start|>assistant
find . -type f | xargs grep -I "ne... | Search the current directory recursively for files containing "needle text" | find . -type f | xargs grep -I "needle text" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all executable upvoter-* files/symlinks under maximum 1 level down the {} directory<|im_end|>
<|im_start|>assistant
find {} -name 'upvote... | Find all executable upvoter-* files/symlinks under maximum 1 level down the {} directory | find {} -name 'upvoter-*' \ -maxdepth 1 -perm +111 | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
For each .def file under the current directory, create an empty .def.out file with current timestamp.<|im_end|>
<|im_start|>assistant
find . -... | For each .def file under the current directory, create an empty .def.out file with current timestamp. | find . -name '*.def' | sed 's/\/\1.out/' | xargs touch | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Connect to host "remotehost" as ssh user "user" to copy remote file "/location/KMST_DataFile_*.kms" to current directory on local host.<|im_en... | Connect to host "remotehost" as ssh user "user" to copy remote file "/location/KMST_DataFile_*.kms" to current directory on local host. | scp -v user@remotehost:/location/KMST_DataFile_*.kms | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system Redis server status and send alerts if memory usage exceeds a certain threshold.<|im_end|>
<|im_start|>assis... | Create a script to monitor system Redis server status and send alerts if memory usage exceeds a certain threshold. | #!/bin/bash
threshold="90"
memory_usage=$(redis-cli info memory | grep 'used_memory_human' | cut -d ':' -f 2 | sed 's/
$//')
if [ "$memory_usage" -gt "$threshold" ]; then
echo "Redis server memory usage is high: $memory_usage" | mail -s "Redis Memory Alert" user@example.com
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system firewall log events and generate reports on blocked connections.<|im_end|>
<|im_start|>assistant
#!/bin/bash... | Create a script to monitor system firewall log events and generate reports on blocked connections. | #!/bin/bash
touch /tmp/firewall_log_events_report.txt
while true; do
grep 'BLOCK' /var/log/firewall.log >> /tmp/firewall_log_events_report.txt
sleep 3600
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
search for all html files in a folder and create a zip file of all these files<|im_end|>
<|im_start|>assistant
find /your/path/ -type f -name ... | search for all html files in a folder and create a zip file of all these files | find /your/path/ -type f -name "*.html" | xargs zip all_html_files.zip | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all files/directories with 'my key phrase' in their names under current directory and redirect the output to mylist.txt<|im_end|>
<|im_st... | Find all files/directories with 'my key phrase' in their names under current directory and redirect the output to mylist.txt | find -name '*my key phrase*' > mylist.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Get a sorted list of the longest line with line number for each file under current directory<|im_end|>
<|im_start|>assistant
find . -iname '*.... | Get a sorted list of the longest line with line number for each file under current directory | find . -iname '*.page' -exec awk '{if(length($0) > L) { LINE=NR;L = length($0)}} END {print L"|"FILENAME":"LINE}' {} \; | sort | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
set alias "cdl" for command 'cd -- "$"'<|im_end|>
<|im_start|>assistant
alias cdl='cd -- "$"'<|im_end|> | set alias "cdl" for command 'cd -- "$"' | alias cdl='cd -- "$"' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find al the files which have been accesed in the last 6 days and display their details<|im_end|>
<|im_start|>assistant
find . -atime +6 -exec ... | find al the files which have been accesed in the last 6 days and display their details | find . -atime +6 -exec ll | more | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Reports time consumed by command 'sleep 1'.<|im_end|>
<|im_start|>assistant
time sleep 1<|im_end|> | Reports time consumed by command 'sleep 1'. | time sleep 1 | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system HTTP response times and send alerts if response times exceed a certain threshold.<|im_end|>
<|im_start|>assi... | Create a script to monitor system HTTP response times and send alerts if response times exceed a certain threshold. | #!/bin/bash
threshold="500"
response_time=$(curl -o /dev/null -s -w '%{time_total}' http://example.com)
if (( $(echo "$response_time > $threshold" | bc -l) )); then
echo "HTTP response time is high: $response_time seconds" | mail -s "HTTP Response Alert" user@example.com
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system CPU usage per process and logs any processes consuming excessive CPU resources.<|im_end|>
<|im_start|>ass... | Create a script that monitors system CPU usage per process and logs any processes consuming excessive CPU resources. | #!/bin/bash
threshold=50
while true; do
ps -eo pid,%cpu,comm | awk '{if ($2 > $threshold) print "Process " $3 " (PID: " $1 ") is consuming high CPU resources: " $2 "%"}'
sleep 300
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the 2nd white space separated fields in "file.txt" as a comma separated list<|im_end|>
<|im_start|>assistant
awk '{print $2}' < file.txt... | Print the 2nd white space separated fields in "file.txt" as a comma separated list | awk '{print $2}' < file.txt | paste -s -d, - | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List environment variables whose name contains "X"<|im_end|>
<|im_start|>assistant
set | grep -oP '^\w*(?==)' | grep X<|im_end|> | List environment variables whose name contains "X" | set | grep -oP '^\w*(?==)' | grep X | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system firewall rules and block IP addresses with excessive failed login attempts.<|im_end|>
<|im_start|>assistant
... | Create a script to monitor system firewall rules and block IP addresses with excessive failed login attempts. | #!/bin/bash
threshold="3"
failed_attempts=$(grep 'authentication failure' /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -nr | head -n 1 | awk '{print $1}')
if [ "$failed_attempts" -gt "$threshold" ]; then
ip_address=$(grep 'authentication failure' /var/log/auth.log | awk '{print $11}' | sort | uni... | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system hardware error logs and alerts if any errors are found.<|im_end|>
<|im_start|>assistant
#!/bin/bash
whil... | Create a script that monitors system hardware error logs and alerts if any errors are found. | #!/bin/bash
while true; do
dmesg | grep -i 'error' && echo "Hardware error detected"
sleep 300
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check if a string contains only alphabetic characters and special characters.<|im_end|>
<|im_start|>assistant
#!/bin/bash
string="abc!@#"
if... | Check if a string contains only alphabetic characters and special characters. | #!/bin/bash
string="abc!@#"
if [[ "$string" =~ ^[[:alpha:]!@#]+$ ]]; then
echo "$string contains only alphabetic characters and special characters"
else
echo "$string does not contain only alphabetic characters and special characters"
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor Apache server status and send an alert if the server is down.<|im_end|>
<|im_start|>assistant
#!/bin/bash
http_sta... | Create a script to monitor Apache server status and send an alert if the server is down. | #!/bin/bash
http_status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost)
if [ "$http_status" -ne 200 ]; then
echo "Apache server is down."
# Send alert here
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Automatically spell check file "text.txt" using "ispell" command and log the output to "out.txt"<|im_end|>
<|im_start|>assistant
yes 0 | scrip... | Automatically spell check file "text.txt" using "ispell" command and log the output to "out.txt" | yes 0 | script -c 'ispell text.txt' out.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Write summary of files present only in dir1, and which files differ between dir1 and dir2 to file 'difference1.txt'<|im_end|>
<|im_start|>assi... | Write summary of files present only in dir1, and which files differ between dir1 and dir2 to file 'difference1.txt' | diff -r dir1 dir2 | grep dir1 | awk '{print $4}' > difference1.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Uses GNU tool 'time' to estimate time consumed by command 'command' and redirects output to file<|im_end|>
<|im_start|>assistant
\time -o time... | Uses GNU tool 'time' to estimate time consumed by command 'command' and redirects output to file | \time -o time.log command | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the list of all listening network connections with their associated processes.<|im_end|>
<|im_start|>assistant
#!/bin/bash
netstat -tul... | Print the list of all listening network connections with their associated processes. | #!/bin/bash
netstat -tulnp | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Creates temporary file and saves path to it in 'fif2' variable.<|im_end|>
<|im_start|>assistant
fif2=$<|im_end|> | Creates temporary file and saves path to it in 'fif2' variable. | fif2=$ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Remount part of the file hierarchy from "olddir" to "newdir"<|im_end|>
<|im_start|>assistant
mount --bind olddir newdir<|im_end|> | Remount part of the file hierarchy from "olddir" to "newdir" | mount --bind olddir newdir | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Write the standard output and error of "ls" to the console and append it to "/tmp/ls.txt"<|im_end|>
<|im_start|>assistant
ls 2>&1 | tee -a /tm... | Write the standard output and error of "ls" to the console and append it to "/tmp/ls.txt" | ls 2>&1 | tee -a /tmp/ls.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
display a long listing of all the regular/normal files in the current folder along with their md5sum<|im_end|>
<|im_start|>assistant
find . -t... | display a long listing of all the regular/normal files in the current folder along with their md5sum | find . -type f -exec sh -c 'printf "%s %s \n" "$" "$"' '' '{}' '{}' \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Display all lines containing UTRACE in the current kernel's compile-time config file.<|im_end|>
<|im_start|>assistant
grep UTRACE /boot/config... | Display all lines containing UTRACE in the current kernel's compile-time config file. | grep UTRACE /boot/config-$(uname -r) | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print amount of space available on the file system containing path to the current working directory.<|im_end|>
<|im_start|>assistant
df $PWD |... | Print amount of space available on the file system containing path to the current working directory. | df $PWD | awk '/[0-9]%/{print $(NF-2)}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find all the files in the current folder and replace old string with new string<|im_end|>
<|im_start|>assistant
find . | xargs perl -p -i -e ‘... | find all the files in the current folder and replace old string with new string | find . | xargs perl -p -i -e ‘s/something/else/g’ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the names and sizes of regular files residing in the "tmp" directory tree<|im_end|>
<|im_start|>assistant
find tmp -type f -printf "f %s... | Print the names and sizes of regular files residing in the "tmp" directory tree | find tmp -type f -printf "f %s %p\n" | awk '{sub(/^[^ ]+ +[^ ]/,sprintf)}1' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system MySQL database performance and send alerts if slow queries are detected.<|im_end|>
<|im_start|>assistant
#!/... | Create a script to monitor system MySQL database performance and send alerts if slow queries are detected. | #!/bin/bash
threshold="5"
slow_queries=$(mysqladmin status | grep Slow_queries | awk '{print $4}')
if [ "$slow_queries" -gt "$threshold" ]; then
echo "Slow queries detected in MySQL database: $slow_queries" | mail -s "MySQL Performance Alert" user@example.com
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find the largest number among given numbers.<|im_end|>
<|im_start|>assistant
#!/bin/bash
max=0
for num in $@; do
if (( num > max )); the... | Find the largest number among given numbers. | #!/bin/bash
max=0
for num in $@; do
if (( num > max )); then
max=$num
fi
done
echo "Largest number is: $max" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system process count and send alerts if the number of processes exceeds a certain limit.<|im_end|>
<|im_start|>assi... | Create a script to monitor system process count and send alerts if the number of processes exceeds a certain limit. | #!/bin/bash
threshold=500
process_count=$(ps aux | wc -l)
if [ "$process_count" -gt "$threshold" ]; then
echo "Number of processes is above threshold: $process_count" | mail -s "Process Count Alert" admin@example.com
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Execute awk script "script.awk" that exists in "$PATH" with argument "arg1"<|im_end|>
<|im_start|>assistant
awk -f `which script.awk` arg1<|im... | Execute awk script "script.awk" that exists in "$PATH" with argument "arg1" | awk -f `which script.awk` arg1 | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Display in an optimized way file status for all regular files in the current directory tree suppressing error messages<|im_end|>
<|im_start|>a... | Display in an optimized way file status for all regular files in the current directory tree suppressing error messages | time find . -type f -exec stat {} + > /dev/null | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
display all the directories in the current folder which start with processor followed by digit and ends with .1 or .2<|im_end|>
<|im_start|>as... | display all the directories in the current folder which start with processor followed by digit and ends with .1 or .2 | find . -type d -regextype posix-egrep -regex '\./processor[[:digit:]]*/10\.' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all *.coffee files under /some/path and run 'perl /path/to/your/program' with all of the file paths as its arguments<|im_end|>
<|im_start... | Find all *.coffee files under /some/path and run 'perl /path/to/your/program' with all of the file paths as its arguments | find /some/path -name '*.coffee' -print0 | xargs -0 perl /path/to/your/program | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print a detailed list of all files under and below the two directories given as variables $FULFILLMENT and $ARCH1<|im_end|>
<|im_start|>assist... | Print a detailed list of all files under and below the two directories given as variables $FULFILLMENT and $ARCH1 | find $FULFILLMENT $ARCH1 -exec stat -c '%i,%b,%A,%h,%U,%G,%y,%n' {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Remove trailing white spaces from all files under current directory ignoring .git and .svn directories<|im_end|>
<|im_start|>assistant
find . ... | Remove trailing white spaces from all files under current directory ignoring .git and .svn directories | find . -not \( -name .svn -prune -o -name .git -prune \) -type f -exec sed -i "s/[[:space:]]*$//g" "{}" \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
grep for the last occurrence of text between two tags<|im_end|>
<|im_start|>assistant
tac a | grep -m1 -oP '.*'<|im_end|> | grep for the last occurrence of text between two tags | tac a | grep -m1 -oP '.*' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Write output and error of "ant" to the console and to "build.log"<|im_end|>
<|im_start|>assistant
ant 2>&1|tee build.log<|im_end|> | Write output and error of "ant" to the console and to "build.log" | ant 2>&1|tee build.log | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search the regular files of the current directory tree for string "whatever"<|im_end|>
<|im_start|>assistant
find . -type f | xargs grep whate... | Search the regular files of the current directory tree for string "whatever" | find . -type f | xargs grep whatever | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Saves printed calendar of February,1900 in positional variables.<|im_end|>
<|im_start|>assistant
set -- $<|im_end|> | Saves printed calendar of February,1900 in positional variables. | set -- $ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List all files/directories under current directory using comma as the delimiter for different fields in the output<|im_end|>
<|im_start|>assi... | List all files/directories under current directory using comma as the delimiter for different fields in the output | find . -ls | awk '{printf}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Backup permissions of the files in the current directory tree<|im_end|>
<|im_start|>assistant
find -depth -printf '%m:%u:%g:%p\0' >saved-permi... | Backup permissions of the files in the current directory tree | find -depth -printf '%m:%u:%g:%p\0' >saved-permissions | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print all lines of "seq 1 10" except the last 3<|im_end|>
<|im_start|>assistant
seq 1 10 | perl -ne 'print if ' | perl -ne 'print if ' | perl ... | Print all lines of "seq 1 10" except the last 3 | seq 1 10 | perl -ne 'print if ' | perl -ne 'print if ' | perl -ne 'print if ' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check if a drive with UUID "09b8f1ab-8d4b-4c5f-b395-40be09c090b0" is mounted on "/media/WD_Disk_1"<|im_end|>
<|im_start|>assistant
mount | gre... | Check if a drive with UUID "09b8f1ab-8d4b-4c5f-b395-40be09c090b0" is mounted on "/media/WD_Disk_1" | mount | grep $ | grep '/media/WD_Disk_1 ' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system AWS Lambda function status and trigger automatic retries when function invocations fail.<|im_end|>
<|im_star... | Create a script to monitor system AWS Lambda function status and trigger automatic retries when function invocations fail. | #!/bin/bash
function_name="<function_name>"
function_status=$(aws lambda get-function --function-name $function_name --query 'Configuration.State' --output text)
if [ "$function_status" == "Active" ]; then
aws lambda update-function-configuration --function-name $function_name --timeout 60
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search the current directory recursively for files containing "needle text"<|im_end|>
<|im_start|>assistant
find . -type f -exec grep -Iq . {}... | Search the current directory recursively for files containing "needle text" | find . -type f -exec grep -Iq . {} \; -and -print0 | xargs -0 grep "needle text" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search for the string 'foo' in *.html files under /usr/src/linux directory<|im_end|>
<|im_start|>assistant
grep foo `find /usr/src/linux -name... | Search for the string 'foo' in *.html files under /usr/src/linux directory | grep foo `find /usr/src/linux -name "*.html"` | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Set LANG variable to 'en_US' and prints calendar for a current month.<|im_end|>
<|im_start|>assistant
LANG=en_US cal<|im_end|> | Set LANG variable to 'en_US' and prints calendar for a current month. | LANG=en_US cal | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Download 10 web pages "http://example.com/?page${i}.html" at most 2 at a time with "${i}" ranging from 1 to 10<|im_end|>
<|im_start|>assistant... | Download 10 web pages "http://example.com/?page${i}.html" at most 2 at a time with "${i}" ranging from 1 to 10 | seq 1 10 | xargs -n1 -P2 bash -c 'i=$0; url="http://example.com/?page${i}.html"; curl -O -s $url' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to check if a number is a strong number or not.<|im_end|>
<|im_start|>assistant
#!/bin/bash
strong_number() {
num="$1"
... | Create a script to check if a number is a strong number or not. | #!/bin/bash
strong_number() {
num="$1"
temp="$num"
sum=0
while [ "$num" -gt 0 ]; do
digit=$((num % 10))
factorial=1
for ((i=1; i<=digit; i++)); do
factorial=$((factorial * i))
done
sum=$((sum + factorial))
num=$((num / 10))
done
if [ "... | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List all nfs mount points on the system<|im_end|>
<|im_start|>assistant
mount -l | grep 'type nfs' | sed 's/.* on \([^ ]*\) .*/\1/'<|im_end|> | List all nfs mount points on the system | mount -l | grep 'type nfs' | sed 's/.* on \([^ ]*\) .*/\1/' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print lines in "file1.txt" that do not exist in "file2.txt"<|im_end|>
<|im_start|>assistant
sort < file2.txt file2.txt | uniq -u<|im_end|> | Print lines in "file1.txt" that do not exist in "file2.txt" | sort < file2.txt file2.txt | uniq -u | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Continuously write "Hidden" separated by spaces over the entire "/dev/sdb" disk<|im_end|>
<|im_start|>assistant
yes "Hidden" | paste -d' ' -s ... | Continuously write "Hidden" separated by spaces over the entire "/dev/sdb" disk | yes "Hidden" | paste -d' ' -s - | dd of=/dev/sdb | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system firewall rules and send an alert if any rules are modified.<|im_end|>
<|im_start|>assistant
#!/bin/bash
ori... | Create a script to monitor system firewall rules and send an alert if any rules are modified. | #!/bin/bash
original_rules="/etc/iptables/rules.v4"
current_rules="/tmp/current_rules.v4"
diff=$(diff $original_rules $current_rules)
if [ -n "$diff" ]; then
echo "Firewall rules have been modified." | mail -s "Firewall Rule Modification Alert" user@example.com
fi | AnishJoshi/nl2bash-custom |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.