ll ======
Quelle((http://www.softpanorama.org/Scripting/Shellorama/Reference/string_operations_in_she... ents are given. This is shown in the following script:
#!/bin/bash
export INFILE=${1-"infile"}
expor... variety of things. For example, the following script changes the extension of all .html files to .htm... interactive shell, this will abort the current script. In an interactive shell, this will just print t
. zmore ===
<code>
#!/bin/bash
# zmore
# View gzipped files with 'more' filter.
E_NOARGS=65
E_NOTFOUND=66
E_NOTGZIP=67
if [ $# -eq 0 ] # same effect as: if [ -z "$... xit $E_NOARGS
# Returns 65 as exit status of script (error code).
fi
filename=$1
if [ ! -f "$fil... ble substitution.
then
echo "File $1 is not a gzipped file!"
exit $E_NOTGZIP
fi
zcat $1 | more