Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read files with blank lines from stdin

Status
Not open for further replies.

sfu

Programmer
Oct 13, 2003
10
US
Hi all,

I wanted to know how you can avoid problems when reading from stdin, when the file name is like:
./mydir/my resume
This is interpedet by the shell as two files and my shell script outputs an error message.

I tried several differnt ways, such as:
"'$myVariable'"
"\"$myVariable\""
""$myVariable""
Unfortunately without success...

Anybody has a solution to that ?

Thanks!
 
Could you give us a code snippet so we know what exactly you're trying to do? That'll make it easier to suggest a solution.

 
This should work in most situations:

"${myVariable}"


 
Thanks Ygor, it works perfectly with your solution!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top