
shell
List of commands for shell:
-
shell:file:exists Check if a file exists$ [[ -e ${file} ]]try on your machineexplain this command
-
shell:warp:08a3f Redirect output of command to a file$ ${command} > ${file}try on your machineexplain this command
-
shell:warp:1242c Check if string length is non-zero$ [[ -z ${string} ]]try on your machineexplain this command
-
shell:warp:1ab7f Append value(s) to an array$ ${array_name}+=(${values})try on your machineexplain this command
-
shell:warp:221cc Check if two numbers are equal$ [[ ${integer_a} -eq ${integer_b} ]]try on your machineexplain this command
-
shell:warp:25e37 Check if file exists and is executable by the current process$ [[ -x ${file} ]]try on your machineexplain this command
-
shell:warp:35e99 Set an index in an array to a value$ ${array_name}[${index}]=${value}try on your machineexplain this command
-
shell:warp:3aa79 Read file contents as input to another command$ ${command} < ${file}try on your machineexplain this command
-
shell:warp:49c1f Check if string length is zero$ [[ -n ${string} ]]try on your machineexplain this command
-
shell:warp:49dd1 Get number of elements in an array$ echo ${#${array_name}[@]}try on your machineexplain this command
-
shell:warp:6ebe2 Make a new, empty array$ ${array_name}=()try on your machineexplain this command
-
shell:warp:763dd Loop through an array and run a command on each value$ for i in $${{array_name}[@]}; do ${command}; donetry on your machineexplain this command
-
shell:warp:7a0f1 Check if a number is less than or equal to another number$ [[ ${integer_a} -le ${integer_b} ]]try on your machineexplain this command
-
shell:warp:7bfff Launch tabs with clipboard URLs$ pbpaste | xargs -n1 -I{} open {}try on your machineexplain this command
-
shell:warp:8c02a Check if a number is greater than another number$ [[ ${integer_a} -gt ${integer_b} ]]try on your machineexplain this command
-
shell:warp:8cdd9 Check if file exists and is readable by the current process$ [[ -r ${file} ]]try on your machineexplain this command
-
shell:warp:98a8e Check if file exists and has a size greater than zero$ [[ -s ${file} ]]try on your machineexplain this command
-
shell:warp:99fb0 Search for specified file types and run a certain command for each file$ find -E ${path} -iregex ".*\.(${extensions})" -print | xargs -n1 -I _item ${command} _itemtry on your machineexplain this command
-
shell:warp:9e21f Chain commands together by forwarding output as input to the next command (pipe)$ ${command_1} | ${command_2}try on your machineexplain this command
-
shell:warp:ac282 Check if file exists and is writable by the current process$ [[ -w ${file} ]]try on your machineexplain this command
-
shell:warp:b0313 Check if a number is less than another number$ [[ ${integer_a} -lt ${integer_b} ]]try on your machineexplain this command
-
shell:warp:b0b01 Check if a file exists and is a regular file$ [[ -f ${file} ]]try on your machineexplain this command
-
shell:warp:c137d Check if two numbers are not equal to each other$ [[ ${integer_a} -ne ${integer_b} ]]try on your machineexplain this command
-
shell:warp:c370b Redirect output of command to a file by appending$ ${command} >> ${file}try on your machineexplain this command
-
shell:warp:d869f Shell for-loop$ for ${variable} in ${sequence}; do
$ ${command}
$ donetry on your machineexplain this command -
shell:warp:d9ecb Kill processes at port$ kill $(lsof -t -i:${port})try on your machineexplain this command
-
shell:warp:da280 Check if two strings are equal to each other$ [[ ${string_1} = ${string_2} ]]try on your machineexplain this command
-
shell:warp:e23a5 Check if a number is greater than or equal to another number$ [[ ${integer_a} -ge ${integer_b} ]]try on your machineexplain this command
-
shell:warp:efc39 Get a value from an array$ echo $${{array_name}[${index}]}try on your machineexplain this command
-
shell:warp:f2154 Check if two strings are not equal to each other$ [[ ${string_1} != ${string_2} ]]try on your machineexplain this command
-
shell:warp:f561d Shell while-loop$ while ${condition} do
$ ${command}
$ donetry on your machineexplain this command