Quote:
Originally Posted by porkytech
your cat of a directory is fallacious... it shouldn't success...
cat just concats files.
And the newline appended can be suprimed with the -n flag
so
echo -n hi >> msg
echo -n " dude" >> msg
cat msg
[hi dude]
|
I'm not trying to 'cat' a directory, only a string of text (that happens to be the path of a directory) that is also saved as a variable. I want to be able to call the variable and append that string to the end of the line on a single line file. I may be confused about the proper use of 'cat', but I've tried
echo -n $dir >> $filename".xxx", and it was unsuccessful, as it still added the newline.
Here's how I have it written..
Code:
echo -n " $dir".img >> filename".md5"
Instead of getting this...
Code:
09874508909870987985234... /path/to/directory.img
I'm getting this...
Code:
09874508909870987985234...
/path/to/directory.img