Hi
Does anybody know if there is a way to capture a multi-line input and output it to the file?
I was trying to use "read" for that but it only captures the first line....
I work in ksh...
Any advice? Thanks a lot
A sample data file and a desired output, please (as always).
And also what you have tried so far to accomplish your task (as always).
The part of the script I am trying to write will promp the user to provide the input. Once the input is provided it needs to be send to the file for further processing. For example:
$ my_test_script
PROVIDE INPUT:
The use will copy and paste the following line from the "Word" document which will look something like that:
FMEMBIT_2.DTA FLAGS: 0 6 7 19 21 24 25 28 29 31
FMEMBIT_3.DTA FLAGS: 0 1 3 8 9 12 14 18 19 24 31
FMEMBIT_4.DTA FLAGS: 4 6 7 8 9 12 15 16 19 22 23 27
I need to capture those lines and output them to the file...
I am in ksh and was trying to use "read" but it captures only the first line....
Thanks a lot for any advice..... Cheers -A
something like this ??
echo "enter the input"
while read LINE
do
echo $LINE >> op
if [ "$LINE" = "^A" ];then
break
fi
done
echo "other processing continues "
where you can consider ctrl-A as the terminator character.
Thanks a lot panyam! This is what i need....