Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:shell [2024/04/21 14:02]
cyril [Misc]
linux:shell [2024/04/22 00:07]
cyril [Misc]
Line 94: Line 94:
   * **Check number of arguments and print usage:**<code bash>   * **Check number of arguments and print usage:**<code bash>
 if [[ $# -lt 2 ]]; then if [[ $# -lt 2 ]]; then
-        echo "Usage: foo.sh <arg1> <arg2>+        echo "Usage: foo.sh <arg1> <arg2>" 1>&2
         exit 1         exit 1
 fi fi
 +</code>
 +  * Load command output as a file:<code>
 +diff <(grep x file1) <(grep y file2)
 </code> </code>
linux/shell.txt ยท Last modified: 2024/04/22 00:07 by cyril
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0