I have a file called indexes.out
The contents below is inside indexes.out file:
informix abc_aseld_idx1
informix abc_aseld_idx2
informix abc_aseld_idx3
informix abc_aseld_idx4
informix abc_aseld_idx5
I want to create a for loop that can pull each line at a time keeping the format. I am using the below for loop command:
for i in `
cat indexes.out`
do
echo "$i"
done
Ouput is:
informix
abc_aseld_idx1
informix
abc_aseld_idx2
informix
abc_aseld_idx3
informix
abc_aseld_idx4
informix
abc_aseld_idx5
informix
I want to see the same output as file, because I want to work with both columns in the loop at a later point working with awk $1 and $2:
informix abc_aseld_idx1
informix abc_aseld_idx2
informix abc_aseld_idx3
informix abc_aseld_idx4
informix abc_aseld_idx5
Once in the loop, I want to then use each row to filter on specific columns individually.
awk
directly instead of the loop? – pLumo Jul 19 '19 at 08:30while read i; do echo "$i"; done < indexes.out
– JJoao Jul 19 '19 at 10:32