IFS=''
cat test.file |
while read data
do
echo "$data"
done
I realize you might have simplified the example from something that really needed a pipeline, but before someone else says it:
IFS=''
while read data; do
echo "$data"
done < test.file
More Related Contents:
- What does 2>&1 mean here?
- How to reload .bashrc settings without logging out and back in again?
- How do I iterate over a range of numbers defined by variables in Bash?
- When do we need curly braces around shell variables?
- Why does my Bash code fail when I run it with ‘sh’?
- How to manually expand a special variable (ex: ~ tilde) in bash
- Accessing bash command line args $@ vs $*
- Bash command line and input limit
- Replace one substring for another string in shell script
- How can I escape a double quote inside double quotes?
- Tilde in path doesn’t expand to home directory
- Bash syntax error: unexpected end of file
- How to assign the output of a Bash command to a variable? [duplicate]
- Getting an “ambiguous redirect” error
- Is there a TRY CATCH command in Bash
- Parsing variables from config file in Bash
- Bash check shows file exists for non-existent files?
- bash set -e and i=0;let i++ do not agree
- read in bash on whitespace-delimited file without empty fields collapsing
- Relative paths based on file location instead of current working directory [duplicate]
- Is the behavior behind the Shellshock vulnerability in Bash documented or at all intentional?
- Counting lines or enumerating line numbers so I can loop over them – why is this an anti-pattern?
- How do I integrate MSYS2 shell into Visual studio code on Window?
- Use GNU find to show only the leaf directories
- Get the name of the caller script in bash script
- How does testing if a string is ‘greater’ than another work in Bash?
- Reading lines from two files in one while loop
- What is the shortest way to get n-th column of an output?
- Creating tar file and naming by current date
- Can bash script be written inside a AWS Lambda function