I have a utility script that among other things opens a personal "snippage" text file for interactive editing with vim. Here is a section of the shellscript:
- - - - - - - - -< s n i p >- - - - - - - - - -
if [ $@ == "" ]
then
echo "No snipData in arg list"
else
echo "
+++++++======== begin (arg list) snipData on "`date`"
$@
+++++++======== end snipData
">>$snip/toit.txt
fi
- - - - - - - - -< s n i p >- - - - - - - - - -
With this I can get the contents of a text file appended to toit.txt with a command like:
$ toit `cat test.txt`
But what I want to be able to do is to accomplish the same thing by.
$ cat test.txt|toit
But I have no idea how to redirect the piped input into a variable so that my script can manipulate it...
Would someone be so kind as to give me a clue?
--
joe3
