The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Option in sql script to include column headers when spooling file to .csv format Vijaya UNIX for Dummies Questions & Answers 3 06-10-2009 02:47 PM
How to print log file in column format using awk suresh3566 Shell Programming and Scripting 2 05-06-2008 02:18 PM
To convert multi format file to a readable ascii format gaur.deepti UNIX for Dummies Questions & Answers 5 03-25-2008 03:03 PM
Correct format in a log file sd12 UNIX for Advanced & Expert Users 11 12-12-2007 06:40 PM
Convert UTF8 Format file to ANSI format rajreddy UNIX for Advanced & Expert Users 1 05-24-2007 07:40 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-13-2008
mdap mdap is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 12
Question 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
  #2 (permalink)  
Old 08-14-2008
mdap mdap is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 12
HI guys,

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

mdap
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0