Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:shell [2024/04/21 14:02] cyril [Misc] |
linux:shell [2024/12/11 09:40] (current) cyril [Misc] |
||
---|---|---|---|
Line 94: | Line 94: | ||
* **Check number of arguments and print usage: | * **Check number of arguments and print usage: | ||
if [[ $# -lt 2 ]]; then | if [[ $# -lt 2 ]]; then | ||
- | echo " | + | echo " |
exit 1 | exit 1 | ||
fi | fi | ||
</ | </ | ||
+ | * **Load command output as a file: | ||
+ | diff <(grep x file1) <(grep y file2) | ||
+ | </ | ||
+ | * **Remove extension from file name: | ||
+ | ${f%.png} # with all shells | ||
+ | ${f: | ||
+ | </ | ||
+ | |||
+ |