I am having problems printing each line from my output list.
The contents look like this:
My text file, if you cat it has a string that looks like this:
YYYYMMDD - ABCD B-1B DCI (Foo) Meeting Minutes - Template
However my output is printing out each item as a line, like this:
I want to print this line:YYYYMMDD
I want to print this line:-
I want to print this line:ABCD
I want to print this line:B-1B
I want to print this line:DCI
I want to print this line:(Foo)
I want to print this line:Meeting
I want to print this line:Minutes
I want to print this line:-
I want to print this line:Template
How do I fix this so that I print out each string?
Here is my code:
PGLIST="pglist.lst";
PGS=`cat $PGLIST`;
#Create a list from executing this script
./confluence.sh $CMD_PGLIST $CMD_SPACE "$1" > "$PGLIST"
#Print out lines
for line in $PGS; do
echo "I want to print this line:$line"
done