query,gold "Retrieve only build number of current kernel, ie. #104",uname -v | grep -o '#[0-9]\+' Print reverse lookup for adress 127.0.0.1,dig -x 127.0.0.1 "List file information of the full path of command ""c++""",ls -ald `which c++` "Extract host name part from ""http://www.google.com""","echo ""http://www.google.com"" | cut -d'/' -f3" "List environment variables and their values, escaping all semicolons with a backslash.",env | sed 's/;/\\;/g' Displays a tree of all process alongside their command line arguments.,pstree -a "Create intermediate directories ""dir"" and ""subdir"" as required and create ""subsubdir""",mkdir -p dir/subdir/subsubdir "Change to the directory of the executable ""python""",cd `dirname $(which python)` "Print numbers 1 through 10 separated by "":""",yes | head -n10 | grep -n . | cut -d: -f1 | paste -sd: print all readline bindings,bind -P "list names of bind functions containing ""p""",bind -l | grep p List all files on smbfs mounts,mount -v | grep smbfs | awk '{print $3}' | xargs ls -ls Save first IP address of domain 'google.com' in 'address' variable and display it,address=$(dig +short google.com | grep -E '^[0-9.]+$' | head -n 1) && echo $address "Remove all characters except "";"" and digits from the string "" Hello world;876 """,echo ' Hello world;876 ' | tr -cd ';0-9' "Remove leading and trailing spaces or tabs from "" Hello world! """,echo ' Hello world! ' | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//' "Remove the last 3 characters from ""987654321""",echo 987654321 | rev | cut -c 4- | rev Print source of the file system containing current working directory.,df . | tail -1 | awk '{print $1}' "List all variables (names only) with names containing ""H"".",env | awk -F= '{if($1 ~ /H/) print $1}' Print a list of unique users who are logged in,who | cut -d' ' -f1 | sort | uniq "Ping hostname, grep for 192.168.11 and print the IP from the output",ping -c 1 hostname | grep 192.168.11 | grep 'bytes from' | awk '{print $4}' | sed 's/://g' Print a line of 99 '=' characters,seq -s= 100|tr -d '[:digit:]' Counts all business days in a current month.,cal -h | cut -c 4-17 | tail -n +3 | wc -w Count number of users logged in,who | awk -F' ' '{print $1}' | sort -u | wc -l "Displays calendar of a previous, current and next month for December of 2120 year.",cal -3 12 2120 "Extract, sort and print only group names from /etc/group.",cut -d: -f1 /etc/group | sort Store system load average number in the 'proc_load_average' variable and print it.,"proc_load_average=$(w | head -n 1 | awk '{print $NF}' | tr ',' '.') && echo $proc_load_average" Calculate the sum of all the numbers from 1 to 10,seq 10 | jq -s 'add'