AWK CSV to TXT format, TXT file not in a correct column format

HI guys,

I have created a script to read 1 column in a csv file and then place it in text file.

However, when i checked out the text file, it is not in a column format...

Example:
CSV file contains
name,age
aa,11
bb,22
cc,33

After using awk to get first column
TXT file contains
name[]aa[]bb[]cc

the [] are box characters.

the command used is:

cat file1.csv | awk -F "," '{print $1}' > file2.txt

do you have any idea why this is happening?

Could this be resolved?

Thanks,
Martin

HI guys,

Just disregard this post. I just found out that columns are working fine.. :slight_smile:

mdap