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
print number of jobs<|im_end|>
<|im_start|>assistant
n_jobs=`expr $`<|im_end|> | print number of jobs | n_jobs=`expr $` | 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
Convert directory of files from dos to unix<|im_end|>
<|im_start|>assistant
find . -type f | while read file; do sed -e 's/^M//g' -i "$file"; ... | Convert directory of files from dos to unix | find . -type f | while read file; do sed -e 's/^M//g' -i "$file"; 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 files having python in filename<|im_end|>
<|im_start|>assistant
find / -name '*python*'<|im_end|> | search for files having python in filename | find / -name '*python*' | 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 disk usage by user and alerts if any user exceeds a certain threshold.<|im_end|>
<|im_start|>assistant
#!... | Create a script that monitors system disk usage by user and alerts if any user exceeds a certain threshold. | #!/bin/bash
threshold=50
while true; do
du -h /home/* | sort -rh | awk '$1 ~ /^[0-9]/ && $1 > "$threshold" {print $1, $2}'
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
list all aliases<|im_end|>
<|im_start|>assistant
alias<|im_end|> | list all aliases | alias | 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 "git-root" for command "if [ "`git rev-parse --show-cdup`" != "" ]; then cd `git rev-parse --show-cdup`; fi"<|im_end|>
<|im_start|>a... | set alias "git-root" for command "if [ "`git rev-parse --show-cdup`" != "" ]; then cd `git rev-parse --show-cdup`; fi" | alias git-root='if [ "`git rev-parse --show-cdup`" != "" ]; then cd `git rev-parse --show-cdup`; 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
Recursively bind "/sys" to "/var/snmp3/sys"<|im_end|>
<|im_start|>assistant
mount --rbind /sys /var/snmp3/sys<|im_end|> | Recursively bind "/sys" to "/var/snmp3/sys" | mount --rbind /sys /var/snmp3/sys | 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 root access attempts and alerts if any user attempts to gain root access.<|im_end|>
<|im_start|>assistant... | Create a script that monitors system root access attempts and alerts if any user attempts to gain root access. | #!/bin/bash
while true; do
last | grep 'root'
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
Create a script to monitor system root user process disk I/O and send an alert if any process exceeds a certain disk I/O threshold.<|im_end|>
... | Create a script to monitor system root user process disk I/O and send an alert if any process exceeds a certain disk I/O threshold. | #!/bin/bash
threshold="100"
processes=$(ps aux --sort=-%io | awk 'NR<=5{print $11}')
while read -r process; do
io_usage=$(iotop -b -n 1 | grep "$process" | awk '{print $10}')
if [ "$io_usage" -gt "$threshold" ]; then
echo "Process $process is performing high disk I/O: $io_usage KB/s (root user)" | ma... | 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 command "$cmd_str" on host "$SERVER" as user "$USER"<|im_end|>
<|im_start|>assistant
ssh "$USER@$SERVER" "$cmd_str"<|im_end|> | Execute command "$cmd_str" on host "$SERVER" as user "$USER" | ssh "$USER@$SERVER" "$cmd_str" | 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 containing directories from variable 'path' ie. "/some/specific/directory" becomes "directory".<|im_end|>
<|im_start|>assistant
path=$<... | Remove containing directories from variable 'path' ie. "/some/specific/directory" becomes "directory". | path=$ | 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 text files in the folder /home/calvin/ and save the output to /tmp/search.log<|im_end|>
<|im_start|>assistant
find /home/c... | search for all the text files in the folder /home/calvin/ and save the output to /tmp/search.log | find /home/calvin/ -name “*.txt” > /tmp/search.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
Print inode, permissions, size, and modification date of all files in the current directory tree as a list with an extra column prepended<|im_... | Print inode, permissions, size, and modification date of all files in the current directory tree as a list with an extra column prepended | tree -afispugD --inodes | awk '{FS="./"; ORS=""; printf("%-60s%s\n",$NF,$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
Convert Unix `cal` output to latex table code.<|im_end|>
<|im_start|>assistant
cal | sed '1d;2{h;s/./ /g;x};/^\s*$/b;G;s/\n/ /;s/^...\.*/\1/;s... | Convert Unix `cal` output to latex table code. | cal | sed '1d;2{h;s/./ /g;x};/^\s*$/b;G;s/\n/ /;s/^...\.*/\1/;s/.../ &\t\&/g;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
Counts all files in a current folder and in subfolders one-level lower, and sort folder list by number of files within.<|im_end|>
<|im_start|>... | Counts all files in a current folder and in subfolders one-level lower, and sort folder list by number of files within. | find . -maxdepth 1 -type d -print0 | xargs -0 -I {} sh -c 'echo $ {}' | sort -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
Create a script to monitor system root user process network I/O and send an alert if any process exceeds a certain network I/O threshold durin... | Create a script to monitor system root user process network I/O and send an alert if any process exceeds a certain network I/O threshold during specific hours. | #!/bin/bash
threshold="100"
current_hour=$(date +'%H')
if [ "$current_hour" -ge "8" ] && [ "$current_hour" -le "18" ]; then
processes=$(ps aux --sort=-%io | awk 'NR<=5{print $11}')
while read -r process; do
io_usage=$(iftop -t -s 1 | grep "$process" | awk '{print $6}')
if [ "$io_usage" -gt "... | 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 text files in the folder /tmp/1<|im_end|>
<|im_start|>assistant
find "/tmp/1" -iname "*.txt"<|im_end|> | display all text files in the folder /tmp/1 | find "/tmp/1" -iname "*.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
Saves 'tmux' version in the 'tmux_version' variable.<|im_end|>
<|im_start|>assistant
tmux_version="$(tmux -V | cut -c 6-)"<|im_end|> | Saves 'tmux' version in the 'tmux_version' variable. | tmux_version="$(tmux -V | cut -c 6-)" | 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
Finds recursively all files in '/path/' excluding folders dir1, dir2 and all like *.dst, that contain 'pattern', and prints matched strings wi... | Finds recursively all files in '/path/' excluding folders dir1, dir2 and all like *.dst, that contain 'pattern', and prints matched strings with string number and file name. | grep --exclude-dir={dir1,dir2,*.dst} -rnw '/path/to/somewhere/' -e "pattern" | 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 jpg files in the current folder and resize them to 50% of their original size<|im_end|>
<|im_start|>assistant
find . -name "*.JPG... | find all the jpg files in the current folder and resize them to 50% of their original size | find . -name "*.JPG" -exec convert {} -resize 50% {} \; | 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
prints the last occurrence of text between two tags<|im_end|>
<|im_start|>assistant
tac file | sed -n '0,/<tag>\(.*\)<\/tag>/s//\1/p'<|im_end|... | prints the last occurrence of text between two tags | tac file | sed -n '0,/<tag>\(.*\)<\/tag>/s//\1/p' | 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 directory name of the current bash script to variable "path" if it is found in one of the directories specified by PATH.<|im_end|>
<|... | Save the directory name of the current bash script to variable "path" if it is found in one of the directories specified by PATH. | path="$( dirname "$" )" | 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
Calculate the md5 sum of the contents of the sorted list of files "$FILES"<|im_end|>
<|im_start|>assistant
cat $ | md5sum<|im_end|> | Calculate the md5 sum of the contents of the sorted list of files "$FILES" | cat $ | md5sum | 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 files containing a specific text pattern and list the file names.<|im_end|>
<|im_start|>assistant
#!/bin/bash
grep -rl "search... | Search for all files containing a specific text pattern and list the file names. | #!/bin/bash
grep -rl "search_pattern" /path/to/directory | 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 column count of compressed file "$file"<|im_end|>
<|im_start|>assistant
zcat "$file" | awk '{print NF}' | head<|im_end|> | Print the column count of compressed file "$file" | zcat "$file" | awk '{print NF}' | head | 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
Prints real path of the folder containing $0 file.<|im_end|>
<|im_start|>assistant
$(readlink -f $)<|im_end|> | Prints real path of the folder containing $0 file. | $(readlink -f $) | 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 html files in current folder and replace some pattern in all these files<|im_end|>
<|im_start|>assistant
find -name "*.htm" | whil... | display all html files in current folder and replace some pattern in all these files | find -name "*.htm" | while read file; do sed "s|<title>sometext</title>|<title>${file##*/}</title>|g" -i $file; 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
Find files/directories named 'photo.jpg' in the entire filesystem<|im_end|>
<|im_start|>assistant
find / -name photo.jpg<|im_end|> | Find files/directories named 'photo.jpg' in the entire filesystem | find / -name photo.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
Create a script to find and delete all directories older than a certain number of days in a directory.<|im_end|>
<|im_start|>assistant
#!/bin/... | Create a script to find and delete all directories older than a certain number of days in a directory. | #!/bin/bash
find . -type d -mtime +$1 -delete
echo "Old directories deleted." | 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
Compress all files not ending in ".gz" in directory "$PATH_TO_LOGS" that were last modified more than "$SOME_NUMBER_OF_DAYS" days ago<|im_end|... | Compress all files not ending in ".gz" in directory "$PATH_TO_LOGS" that were last modified more than "$SOME_NUMBER_OF_DAYS" days ago | find $PATH_TO_LOGS -maxdepth 1 -mtime +$SOME_NUMBER_OF_DAYS -exec sh -c "case {} in *.gz) ;; *) gzip '{}' ;; esac;" \; | 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 the first 13 characters of each ".txt" filename in the "/tmp" directory tree and number the output<|im_end|>
<|im_start|>assistant
find... | Remove the first 13 characters of each ".txt" filename in the "/tmp" directory tree and number the output | find /tmp -type f \( -name '*.txt' \) |cut -c14- | nl | 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.<|im_end|>
<|im_start|>assistant
#!/bin/bash
string="yourstring"
if [[ "$string" =~ ^[... | Check if a string contains only alphabetic characters. | #!/bin/bash
string="yourstring"
if [[ "$string" =~ ^[[:alpha:]]+$ ]]; then
echo "$string contains only alphabetic characters"
else
echo "$string does not contain only alphabetic 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
find all the regular files in the current folder which have specific word in their name and force delete all these files and save the log to t... | find all the regular files in the current folder which have specific word in their name and force delete all these files and save the log to the file log_del.txt | find ./ -type f -name '*.c*' -print0 | xargs -0 rm -rf &>> log_del.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
Search for the regex '^aaa$' in all *.txt files under current directory and count the number of matches<|im_end|>
<|im_start|>assistant
| sed ... | Search for the regex '^aaa$' in all *.txt files under current directory and count the number of matches | | sed 's/ /\n/g' | grep '^aaa$' | wc -l | 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 all .java files residing in the current directory tree and modified at least 7 days ago for string "swt"<|im_end|>
<|im_start|>assistan... | Search all .java files residing in the current directory tree and modified at least 7 days ago for string "swt" | find . -name '*.java' -mtime +7 -print0 | xargs -0 grep 'swt' | 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 entire file system and save all the core file paths into a file<|im_end|>
<|im_start|>assistant
find / -name core -print | xargs ec... | search the entire file system and save all the core file paths into a file | find / -name core -print | xargs echo > /tmp/core.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
Send text "spawn daemon" and a newline character to the screen session<|im_end|>
<|im_start|>assistant
screen -r user -X stuff "spawn daemon$"... | Send text "spawn daemon" and a newline character to the screen session | screen -r user -X stuff "spawn daemon$" | 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 an alert if it exceeds a certain threshold.<|im_end|>
<|im_start|>assistant
#!/bin/ba... | Create a script to monitor system process count and send an alert if it exceeds a certain threshold. | #!/bin/bash
threshold="500"
process_count=$(ps aux | wc -l)
if [ "$process_count" -gt "$threshold" ]; then
echo "System process count is too high: $process_count" | mail -s "High Process Count 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
Save the line number matching "}]" in lines starting with "item_1" to "item_2" in "itemlist.json" to variable "line_to_be_replaced"<|im_end|>
... | Save the line number matching "}]" in lines starting with "item_1" to "item_2" in "itemlist.json" to variable "line_to_be_replaced" | line_to_be_replaced=`cat itemlist.json | nl | sed -n '/"item_1"/,/"item_2"/p' | grep -in "}]" | awk '{print $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
Save the list of all subdirectories of the current directory up to depth level 2 as "dirlist"<|im_end|>
<|im_start|>assistant
find -maxdepth 2... | Save the list of all subdirectories of the current directory up to depth level 2 as "dirlist" | find -maxdepth 2 -type d -ls >dirlist | 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
Read a single character from standard input and save to variable "y"<|im_end|>
<|im_start|>assistant
y=$<|im_end|> | Read a single character from standard input and save to variable "y" | y=$ | 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 in current directory and execute myscript for each of them<|im_end|>
<|im_start|>assistant
find . -exec myscript {}... | Find all files/directories in current directory and execute myscript for each of them | find . -exec myscript {} \; | 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
Prints name of a current shell binary file.<|im_end|>
<|im_start|>assistant
ls -l /proc/$$/exe | sed 's%.*/%%'<|im_end|> | Prints name of a current shell binary file. | ls -l /proc/$$/exe | sed '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
Find directories in the /path directory tree whose names are 33 characters in length<|im_end|>
<|im_start|>assistant
find /path -type d -print... | Find directories in the /path directory tree whose names are 33 characters in length | find /path -type d -printf "%f\n" | awk 'length==33' | 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 current folder which end with ".bak" or ".backup" which have not been accessed in the last 30 days and delete the files ... | find all the files in current folder which end with ".bak" or ".backup" which have not been accessed in the last 30 days and delete the files if they exist | find . -type f -atime +30 -exec csh -c 'if rm $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
View history using "less"<|im_end|>
<|im_start|>assistant
history | less<|im_end|> | View history using "less" | history | less | 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 instances of first column with unique rest of line, and output a count for each first column that found in unique lines.<|im_end|>
<|... | Find all instances of first column with unique rest of line, and output a count for each first column that found in unique lines. | sort file | uniq | cut -f1 -d' ' | uniq -c | rev | 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
Renumbers all windows in the session in sequential order.<|im_end|>
<|im_start|>assistant
tmux movew -r<|im_end|> | Renumbers all windows in the session in sequential order. | tmux movew -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 the list of running processes.<|im_end|>
<|im_start|>assistant
#!/bin/bash
ps aux<|im_end|> | Print the list of running processes. | #!/bin/bash
ps aux | 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
Move all lines starting with "Ca" to the beginning of the file<|im_end|>
<|im_start|>assistant
nl -n rz ca | awk -vOFS="\t" '/Ca/{$1="#"$2} {$... | Move all lines starting with "Ca" to the beginning of the file | nl -n rz ca | awk -vOFS="\t" '/Ca/{$1="#"$2} {$1=$1}1' | sort -k1,1 | cut -f2- | 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 table from '111 22 3\n4 555 66\n' with columns separated by a single space<|im_end|>
<|im_start|>assistant
echo -en '111 22 3\n4 555 ... | Create a table from '111 22 3\n4 555 66\n' with columns separated by a single space | echo -en '111 22 3\n4 555 66\n' | column -t | sed 's/ \([0-9]\)/\1/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 average time of 4 ping requests to "www.stackoverflow.com"<|im_end|>
<|im_start|>assistant
ping -c 4 www.stackoverflow.com | sed '$!... | Print the average time of 4 ping requests to "www.stackoverflow.com" | ping -c 4 www.stackoverflow.com | sed '$!d;s|.*/\/.*|\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
Do not mark variables and function which are modified or created for export to the environment of subsequent commands<|im_end|>
<|im_start|>as... | Do not mark variables and function which are modified or created for export to the environment of subsequent commands | set +a | 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 *.dbf files/directories in entire file system discarding errors and print their sorted and unique parent directory paths<|im_end|>
<|... | Find all *.dbf files/directories in entire file system discarding errors and print their sorted and unique parent directory paths | find / -name \*.dbf -print0 2>/dev/null | xargs -0 -n1 dirname | sort | uniq | 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 current directory tree that match the case insensitive regex '^\./course\*[0-9]$' in their paths<|im_end|>
<|im_sta... | Find all directories under current directory tree that match the case insensitive regex '^\./course\*[0-9]$' in their paths | find . -type d -iregex '^\./course\*[0-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
Remove leading and trailing space from lines in file 'in.txt', interactively page through a hexdump of the result.<|im_end|>
<|im_start|>assis... | Remove leading and trailing space from lines in file 'in.txt', interactively page through a hexdump of the result. | awk '{gsub; print;}' in.txt | hexdump -C | less | 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 long listing of all files in the current directory whose size is 24 or 25 bytes.<|im_end|>
<|im_start|>assistant
find . -size -26c -si... | display long listing of all files in the current directory whose size is 24 or 25 bytes. | find . -size -26c -size +23c -ls | 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 variable 'path' to name of current directory .<|im_end|>
<|im_start|>assistant
path=$(basename $)<|im_end|> | Set variable 'path' to name of current directory . | path=$(basename $) | 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
Count the toal number of lines in all .py files in current directory tree<|im_end|>
<|im_start|>assistant
find . -name *.py -exec wc -l {} \; ... | Count the toal number of lines in all .py files in current directory tree | find . -name *.py -exec wc -l {} \; | awk '{ SUM += $0} END { print SUM }' | 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
Mathematically sum each line in "infile"<|im_end|>
<|im_start|>assistant
paste -s -d+ infile | bc<|im_end|> | Mathematically sum each line in "infile" | paste -s -d+ infile | bc | 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 & calculate total number of caractor in all .txt file from current directory<|im_end|>
<|im_start|>assistant
find . -type f -name '*.t... | Find & calculate total number of caractor in all .txt file from current directory | find . -type f -name '*.txt' -exec wc -c {} \; | awk '{total += $1} END{print total}' | 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
Interactively create a symbolic link in the current directory for "$SCRIPT_DIR/$FILE"<|im_end|>
<|im_start|>assistant
ln --symbolic --interact... | Interactively create a symbolic link in the current directory for "$SCRIPT_DIR/$FILE" | ln --symbolic --interactive $SCRIPT_DIR/$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
Print the full real path of "/dev/disk/by-uuid/$1" followed by "is mounted"<|im_end|>
<|im_start|>assistant
echo $ is mounted<|im_end|> | Print the full real path of "/dev/disk/by-uuid/$1" followed by "is mounted" | echo $ is mounted | 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 first 2 lines of tree's help message by redirecting it from standard error to standard output<|im_end|>
<|im_start|>assistant
tree -... | Print the first 2 lines of tree's help message by redirecting it from standard error to standard output | tree --help 2>&1 | head -n2 | 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
change the current working directory to "B" and display all the files in that folder and append the output to the file "tmp.txt"<|im_end|>
<|i... | change the current working directory to "B" and display all the files in that folder and append the output to the file "tmp.txt" | cd B && find . >> ../tmp.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
Send 5 pings to broadcast address "10.10.0.255" and print the unique IPs who responded<|im_end|>
<|im_start|>assistant
ping -c 5 -b 10.11.255.... | Send 5 pings to broadcast address "10.10.0.255" and print the unique IPs who responded | ping -c 5 -b 10.11.255.255 | sed -n 's/.* \([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p' | sort | uniq | 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
reverse both words and lines in file<|im_end|>
<|im_start|>assistant
tac filename | perl -lane 'print join(" ", reverse)'<|im_end|> | reverse both words and lines in file | tac filename | perl -lane 'print join(" ", reverse)' | 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
Calculate the sum of all the numbers from -5 to 10<|im_end|>
<|im_start|>assistant
seq -s+ -5 10 | bc<|im_end|> | Calculate the sum of all the numbers from -5 to 10 | seq -s+ -5 10 | bc | 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 user activity and alerts if any user exceeds a certain threshold of commands executed.<|im_end|>
<|im_sta... | Create a script that monitors system user activity and alerts if any user exceeds a certain threshold of commands executed. | #!/bin/bash
threshold=100
while true; do
lastcomm | awk '{print $1}' | sort | uniq -c | sort -nr | awk '$1 > "$threshold" {print $2, $1}'
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
Create a script to monitor system Elasticsearch cluster status and send alerts if any nodes are unresponsive.<|im_end|>
<|im_start|>assistant
... | Create a script to monitor system Elasticsearch cluster status and send alerts if any nodes are unresponsive. | #!/bin/bash
unresponsive_nodes=$(curl -s 'http://localhost:9200/_cat/nodes' | grep -v '.* r ')
if [ -n "$unresponsive_nodes" ]; then
echo "Elasticsearch cluster has unresponsive nodes: $unresponsive_nodes" | mail -s "Elasticsearch Node 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
Gets state of shell option 'dotglob' and saves it in 'rest_cmd' variable.<|im_end|>
<|im_start|>assistant
rest_cmd=$<|im_end|> | Gets state of shell option 'dotglob' and saves it in 'rest_cmd' variable. | rest_cmd=$ | 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 date of the first Sunday in month $mo of year $yo in the 'do' variable.<|im_end|>
<|im_start|>assistant
do=$(cal -m $mo $yo|awk 'NR>2&&!... | Saves date of the first Sunday in month $mo of year $yo in the 'do' variable. | do=$(cal -m $mo $yo|awk 'NR>2&&!/^ /{print$1;exit}') | 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
Interactively page through a list of all processes running on the system - the arrow keys pan around, and the Q key quits.<|im_end|>
<|im_star... | Interactively page through a list of all processes running on the system - the arrow keys pan around, and the Q key quits. | ps aux | less -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
Search the *.pdf files from directory tree PDFs/ for text "perry sound", ignoring the case, and print the list of matched files<|im_end|>
<|im... | Search the *.pdf files from directory tree PDFs/ for text "perry sound", ignoring the case, and print the list of matched files | find PDFs/ -name '*.pdf' -exec sh -c 'pdftotext "{}" - | grep -l -i --with-filename --label="{}" --color "perry sound"' \; | 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
Archive preserving permissions and ownership files in "/var/www/" on host "user@10.1.1.2" to local "/var/www/"<|im_end|>
<|im_start|>assistant... | Archive preserving permissions and ownership files in "/var/www/" on host "user@10.1.1.2" to local "/var/www/" | sudo rsync -az user@10.1.1.2:/var/www/ /var/www/ | 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 system for files and directories owned by group `managers'<|im_end|>
<|im_start|>assistant
find / -group managers -print<|im_end|> | Search the system for files and directories owned by group `managers' | find / -group managers -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
set alias "foo" for command 'BAR=baz'<|im_end|>
<|im_start|>assistant
alias foo='BAR=baz'<|im_end|> | set alias "foo" for command 'BAR=baz' | alias foo='BAR=baz' | 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 list of all java or jsp files in the current folders<|im_end|>
<|im_start|>assistant
find . \ -type f -ls<|im_end|> | display a list of all java or jsp files in the current folders | find . \ -type f -ls | 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 Elasticsearch server status and send an alert if the server is down.<|im_end|>
<|im_start|>assistant
#!/bin/bash
e... | Create a script to monitor Elasticsearch server status and send an alert if the server is down. | #!/bin/bash
elasticsearch_status=$(systemctl is-active --quiet elasticsearch)
if [ "$elasticsearch_status" != "active" ]; then
echo "Elasticsearch 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
Create a script to monitor system uptime and send an alert if it exceeds a certain threshold.<|im_end|>
<|im_start|>assistant
#!/bin/bash
thr... | Create a script to monitor system uptime and send an alert if it exceeds a certain threshold. | #!/bin/bash
threshold=30
uptime_days=$(uptime | grep -ohe 'up .*' | sed 's/,//g' | awk '{ print $2 }')
if [ "$uptime_days" -gt "$threshold" ]; then
echo "System uptime exceeds $threshold days."
# 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
Search the current directory tree for files executable by at least someone<|im_end|>
<|im_start|>assistant
find . -type f \ -exec test -x {} \... | Search the current directory tree for files executable by at least someone | find . -type f \ -exec test -x {} \; -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
Print unique lines of sorted file "A.txt" compared to sorted file "B.txt"<|im_end|>
<|im_start|>assistant
comm -23 <(sort -u A.txt) <(sort B.t... | Print unique lines of sorted file "A.txt" compared to sorted file "B.txt" | comm -23 <(sort -u A.txt) <(sort 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
Delete files in the DIR directory tree whose names begin with "2015" and contain "album" or "picture"<|im_end|>
<|im_start|>assistant
find DIR... | Delete files in the DIR directory tree whose names begin with "2015" and contain "album" or "picture" | find DIR \( -name 2015\* -a \ \) -delete | 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 all colons with newlines in $list and search for the first match to the regex "^$removepat\$" where $removepat is a variable and save... | Replace all colons with newlines in $list and search for the first match to the regex "^$removepat\$" where $removepat is a variable and save the result to variable 'removestr' | removestr=$ | 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 link to all the html or htm files in the current folder which have been changed in the last 30*24 hours<|im_end|>
<|im_start|>assista... | create a link to all the html or htm files in the current folder which have been changed in the last 30*24 hours | find \ -a -ctime -30 -exec ln {} /var/www/obsolete \; | 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 and directories under the current directory and display the inode of each one, using the stat command on FreeBSD/OSX<|im_end|>
... | find all files and directories under the current directory and display the inode of each one, using the stat command on FreeBSD/OSX | find . -print0 | xargs -0 stat -f '%i ' | 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 that do not contain "main.cpp"<|im_end|>
<|im_start|>assistant
diff <(find . -exec readlink -f {} \; | sed 's/\(.*\)\/.*$... | Find all directories that do not contain "main.cpp" | diff <(find . -exec readlink -f {} \; | sed 's/\(.*\)\/.*$/\1/' | sort | uniq) <(find . -name main.cpp -exec readlink -f {} \; | sed 's/\(.*\)\/.*$/\1/' | sort | uniq) | sed -n 's/< \(.*\)/\1/p' | 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 directory $some_dir is empty<|im_end|>
<|im_start|>assistant
find "$some_dir" -prune -empty -type d | read && echo empty || echo "not... | Check if directory $some_dir is empty | find "$some_dir" -prune -empty -type d | read && echo empty || echo "not empty" | 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 .cpp files that differs in subdirectories PATH1 and PATH2.<|im_end|>
<|im_start|>assistant
diff -rqx "*.a" -x "*.o" -x "*.d" ./PATH1 ./PA... | Find .cpp files that differs in subdirectories PATH1 and PATH2. | diff -rqx "*.a" -x "*.o" -x "*.d" ./PATH1 ./PATH2 | grep "\.cpp " | grep "^Files" | 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 whether the unique contents of "set1" and "set2" differ<|im_end|>
<|im_start|>assistant
diff -q < <<|im_end|> | Print whether the unique contents of "set1" and "set2" differ | diff -q < < | 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 directories in a folder and limit the search to current folder and give them as input to the python script<|im_end|>
<|im_s... | search for all the directories in a folder and limit the search to current folder and give them as input to the python script | find /stuff/* -type d -maxdepth 1 -print0 | xargs -0 script.py | 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 a random 4 byte unsigned integer from "/dev/urandom" to variable "RAND"<|im_end|>
<|im_start|>assistant
RAND=`od -t uI -N 4 /dev/urandom ... | Save a random 4 byte unsigned integer from "/dev/urandom" to variable "RAND" | RAND=`od -t uI -N 4 /dev/urandom | awk '{print $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
search for all the files in the current folder which have spaces, save the output of a file and save the long listing of these files to a log ... | search for all the files in the current folder which have spaces, save the output of a file and save the long listing of these files to a log file | find . -name "filename including space" -print0 | tee my_teed_file | xargs -0 ls -aldF > log.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
Create a script to find the sum of proper divisors of a number.<|im_end|>
<|im_start|>assistant
#!/bin/bash
sum_proper_divisors() {
num="... | Create a script to find the sum of proper divisors of a number. | #!/bin/bash
sum_proper_divisors() {
num="$1"
sum=0
for ((i=1; i<num; i++)); do
if [ $((num % i)) -eq 0 ]; then
sum=$((sum + i))
fi
done
echo "$sum"
}
sum_proper_divisors 28 | 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
Cuts off last part from the path $dir, and deletes resulted folder if empty.<|im_end|>
<|im_start|>assistant
rmdir "$"<|im_end|> | Cuts off last part from the path $dir, and deletes resulted folder if empty. | rmdir "$" | 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 power supply voltage and send an alert if it's too low.<|im_end|>
<|im_start|>assistant
#!/bin/bash
thresho... | Create a script to monitor system power supply voltage and send an alert if it's too low. | #!/bin/bash
threshold=11
power_supply_voltage=$(sensors | grep 'Vcore' | awk '{print $2}')
if [ "$power_supply_voltage" -lt "$threshold" ]; then
echo "System power supply voltage is too low."
# 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
Creates temporary file and saves path to it in 'content_dir1' variable.<|im_end|>
<|im_start|>assistant
content_dir1=$<|im_end|> | Creates temporary file and saves path to it in 'content_dir1' variable. | content_dir1=$ | 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
recursively look for files ending in either .py or .py.server<|im_end|>
<|im_start|>assistant
find . \( -name "*.py" -o -name "*.py.server" \)... | recursively look for files ending in either .py or .py.server | find . \( -name "*.py" -o -name "*.py.server" \) | 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 contents of "order.txt"<|im_end|>
<|im_start|>assistant
cat order.txt<|im_end|> | Print the contents of "order.txt" | cat order.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
Create a script to monitor system process activity and generate reports on process creations/terminations.<|im_end|>
<|im_start|>assistant
#!/... | Create a script to monitor system process activity and generate reports on process creations/terminations. | #!/bin/bash
touch /tmp/process_activity_report.txt
while true; do
ps -eo pid,ppid,cmd --sort=pid | awk 'NR==1{p=$1;next} $2!=p+1{print "Process with PID " p " terminated"} {p=$1}' >> /tmp/process_activity_report.txt
ps -eo pid,ppid,cmd --sort=ppid | awk 'NR==1{p=$2;next} $2!=p+1{print "Process with PID " $1 " ... | AnishJoshi/nl2bash-custom |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.