A simple but annoying thing:
Using a script as follows:
while read x; do echo "$x" done<file
in a file containing spaces:
text
will give me a way out without spaces:
text
The problem is that I need this space in front of the text (this is one tab mainly, but not always).
So the question is: how to get identical lines, like in the input file in a script?
Update: Good, so I changed my while read x to while IFS= read x .
echo "$x" gives the correct answer without removing the first tab , but , eval "echo $x" removes this tab.
What should I do then?
bash
kasper
source share