Angela_Wilcox
asked on
Read Multi-Line file in as variable
I am not a Unix coder - but I have to create automation scripts for my application. So I am a hack. I am trying to figure out a way to read a multi-line text file into a variable to be used in a function. The text file is 5 time stamps with CR after each I added a final 6th line that says END to the file. I am trying this command currently:
Until CONTENTS = "END"
read CONTENTS
do
runsetnotecmd;
done < $NoteMsg
Runsetnotecmd reads the $CONTENTS variable and writes it to a note area of my application. Currently - I get line number 5 directly preceding the END as the variable contents. I need all 5 lines.
Thank you for your help
Until CONTENTS = "END"
read CONTENTS
do
runsetnotecmd;
done < $NoteMsg
Runsetnotecmd reads the $CONTENTS variable and writes it to a note area of my application. Currently - I get line number 5 directly preceding the END as the variable contents. I need all 5 lines.
Thank you for your help
Your problem may be in the runsetnotecmd, the first time it should write the subsequent times it should append.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That worked great - thanks
ASKER