[Burichan] [Futaba] [Gurochan] [Photon] - [Home]

[Return]
Reply mode
Name
Link
Subject
Comment
File
Verification
Password (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 1000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.

No.1   [Reply]

god dammit. what's the easiest way (in bash) to get the contents of a file into a shell variable?

like, say i have file.txt, which has in it only "in.file", and i want to get that into the variable INFILE so i can say "foo -i $INFILE -o $INFILE.out" or something like that?

>> No.2  

of course, i figure this out like 5 minutes after asking. for the curious, use LOCAL_VARIABLE=$(cat in.file) or something similar.



Delete Post []
Password