A Trip through Linux
by Ken Sipe
Wednesday, April 5, 2017
Bash: Scripting
#!/bin/bash
#
#
generate_list ()
{
echo "one two three"
}
#
#
for word in $(
generate_list
)
do
echo $word
done
exit $?
Result:
$
./gen_list.sh
one
two
three
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment