The UNIX Forums  



Go Back   The UNIX Forums > Top Forums > UNIX for Dummies Questions & Answers
Home Forums Register Rules & FAQDonate Members List Search Today's Posts Mark Forums Read

UNIX for Dummies Questions & Answers If you're not sure where to post a technical question, post it here. All UNIX and Linux Newbies Welcome !!

Reply
 
Submit Tools Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: Jan 2008
Posts: 36
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Lines too long error

Hi Gurus,
I have a big file having around 5000 lines. What I need to do is as below.

$cat myfile
aaaa
bbbb
ccc
ddd
...

I want the output to be as below:

'aaaa,'bbbb','cccc'....

For this I have written something like this

code:
vi sac.txt |nawk '{printf NR","}'>ss
code:

But here the problem is when I try to open the file "ss", it says "Lines to long"

Please helpl me!!!!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 1 Week Ago
...@...
 
Join Date: Feb 2004
Location: NM
Posts: 3,030
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
vi, ed and most command line utilities have a line length limit. Your file, ss, has a line that is too long to read.

1. make the lines shorter
2. use something else to edit the file
Reply With Quote
Forum Sponsor
  #3 (permalink)  
Old 1 Week Ago
Registered User
 
Join Date: Oct 2006
Location: ROK
Posts: 16
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Quote:
Originally Posted by thana View Post
Hi Gurus,
I have a big file having around 5000 lines. What I need to do is as below.

$cat myfile
aaaa
bbbb
ccc
ddd
...

I want the output to be as below:

'aaaa,'bbbb','cccc'....

For this I have written something like this

code:
vi sac.txt |nawk '{printf NR","}'>ss
code:

But here the problem is when I try to open the file "ss", it says "Lines to long"

Please helpl me!!!!
Maybe you can use the nedit program to open the "ss" file.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
help on ksh and sql..getting error as is too long. maximum size is 240 characters." pooga17 UNIX for Advanced & Expert Users 1 02-06-2008 03:56 AM
removing lines in a too long file Goodfella UNIX for Dummies Questions & Answers 4 02-04-2008 07:37 AM
arguments too long error kburrows Shell Programming and Scripting 0 07-21-2006 10:35 AM
Argument list too long - Shell error dad5119 Shell Programming and Scripting 8 03-03-2006 01:57 PM
Re: Long command lines enoch Shell Programming and Scripting 4 05-22-2002 11:04 AM


web tracker

All times are GMT -5. The time now is 02:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93