Bash Scripting: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
* "$@" expands to all command-line parameters. | * "$@" expands to all command-line parameters. | ||
== Command Line Utilities == | |||
* sdiff -s will generate a formatted output of the differences between two files. Very useful. |
Revision as of 15:16, 2 August 2007
String Manipulations
- To replace all substrings by another, use the following syntax:
echo ${stringZ//abc/xyz}
This would replace all occurences of abc in stringZ by xyz. The following replaces only the first match:
echo ${stringZ/abc/xyz}
Special Symbols
- "$@" expands to all command-line parameters.
Command Line Utilities
- sdiff -s will generate a formatted output of the differences between two files. Very useful.