Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
shell scripting basics
- X-seq: zsh-users 1542
- From: Louis-David Mitterrand <mito@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: shell scripting basics
- Date: Sat, 23 May 1998 09:05:33 -0400
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxxx
- Reply-to: mito@xxxxxxxxxxxxxx
I'm trying to learn shell scripting with the examples provided in the
zsh distribution but some things I've not been able to figure out:
- How to read standard input line-by-line inside a script?
For example if the script test.sh is invoked as
"cat README | test.sh"
How do I get a handle to the standard input without using 'cat'
inside the script?
for i in $(<standard input>) do
<something with line>
done
- How to store the output of a function in a scalar?
function hashcode() {
return $[$1 * $2]
}
scalar=`eval hashcode(param1, param2)`
but that doesn't work.
Thanks in advance for suggestions.
--
Louis-David Mitterrand
http://www.aparima.com
mito@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author