Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-05-2010, 10:43 AM   #1
Registered: Jan 2008
Location: Cullompton
Distribution: Kubuntu
Posts: 36

Rep: Reputation: 15
why does AWK split my lines into two?


when I run the following command:

awk -F\, '{print $10 "," $5 "," $1 "," $3 "," $4 "}' myfile > tmpfile

tmpfile displays the lines but they are all cut off and placed on the line below at the same point.

Is there any reason why?

Many Thanks,
Old 08-05-2010, 11:34 AM   #2
LQ Newbie
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Don't know if it was just a typo or not. But if you remove the " (double quote char) just before the closing }, it works as expected on my system.

$cat myfile


$cat tmpfile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
split very large 200mb text file by every N lines (sed/awk fails) doug23 Programming 8 08-10-2009 06:08 PM
How to use split function with AWK command? intikhabalam Linux - General 4 07-29-2008 10:40 AM
awk command to split file Hebron Linux - Newbie 3 08-27-2007 07:35 PM
How to split file , .. awk or split ERBRMN Linux - General 9 08-15-2006 12:02 AM
awk/gawk/sed - read lines from file1, comment out or delete matching lines in file2 rascal84 Linux - General 1 05-24-2006 09:19 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration