export $foo="this is a test" echo ${foo%%t*is}
NOTE
While the # and % identifiers may not seem obvious, they have a convenient mnemonic. The # key is on ... on a dossy system
# only handles file extensions, not filenames
for i in *.html; do
if [ -f ${i%l} ]... ion Example
${foo:-bar} If $foo exists and is not null, return $foo. If it doesn't exist or is null
> if [ "$a" -eq "$b" ]</code>
----
-ne
is not equal to
<code> if [ "$a" -ne "$b" ]</code>
-... " == "$b" ]</code>
This is a synonym for =.
Note
The == comparison operator behaves differently... al to z* (literal matching).
</code>
----
!=
is not equal to
<code>if [ "$a" != "$b" ]</code>
This ... [[ "$a" < "$b" ]]
if [ "$a" \< "$b" ]
</code>
Note that the "<" needs to be escaped within a [ ] co