Please don't bump this up with a new thread if we don't respond fast enough.
The error means exactly what it says: the input data is too long. Some implementations of awk have this annoying limit. If your system has nawk or gawk that should work better.
My system doesn't seem to support gawk. I tried the same command with nawk, and i got the same error. Is there any other way to handle this situation. Please help me on this. If im thru with this, my whole script would be ready to deploy.
Thanks!
---------- Post updated at 04:25 PM ---------- Previous update was at 03:21 PM ----------
Quote:
Originally Posted by freegnu
printf print without a newline
NF?$0:"\n" a conditional expression.
test_condition ? true_result : false_result
NF return 0 for blank lines. Zero is considered false.
$0 returns the whole line/record being considered
"\n" adds a newline to the output when NF is zero
---------- Post updated at 05:53 PM ---------- Previous update was at 04:46 PM ----------
I wrote my own long winded versions of the concise:
This one is just a verbose version of the above version:
This one actually breaks the fields down properly in case you need to process them but outputs field and record separators manually:
I'm facing a error with few files.
awk: There are not enough parameters in printf statement
I tried to print the whole file(without doing any tailoring) with this statement - awk '{printf $0}' < xxx I got the same error, and i found the error reported line has a character '%' in it.
So, i guess printf considers the % symbol in file as a special character. But im not sure this wud be the problem.
¿How can i remove blank lines between all lines in a long text file?
Example
WrongFile.txt :
Line 1
Line 2
Line 3
CorrectFile.txt :
Line 1
Line 2
Line 3
Thanks in advance
:confused: (4 Replies)
What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
Hi there,
I want to trim space between lines in unix.
I have a file named abc.txt with 2,00,000 lines.But useful are only a few. Please tell me how to delete the blank lines.:o (1 Reply)
Hi gurus,
I have this file with blank lines in it.
How do i remove them in shell?
I tried these commands but not working:
sed '/^ *$/d'
or
sed '/^$/d'
Anybody has a better idea pls?
Also there are lines which starts with a single space, how do we remove the space in those lines?... (3 Replies)
I have joined 2 files. Join command worked fine.
but the result showing extra blank lines. I tried to remove blank spaces by using awk (-- -42 RS= ORS="\n\n" file.txt) and sed (sed '/^ *$/d' file.txt)commands but didn't remove any
Any suggestions plz:D
123 tab .......
......tab .......234... (3 Replies)
I really hope someone can help me with this. I have several php files from a forum that I run, that now for some reason have blank lines after every line. Is there an easy way to make a script that does the following:
* If there are consecutive blank lines, delete all of them except one.
* If... (9 Replies)
Hi,
Consider a file named "testfile"
The contents of file are as below
first line added for test
second line added for test
third line added for test
fourth line added for test
fifth line added for test (5 Replies)
Hi,
I am facing a problem related to removing blank lines from a text document.
Input
Error 17-05-2011 11:01:15 VisualSVN Server 2.1 1001
The following information was included with the event:
line3
line4
Error 17-05-2011 11:00:25 VisualSVN Server 2.1 ... (13 Replies)
When I 'vi' my test file I see some blank lines. However once I do :set list to display hidden characters, I see the empty lines literally like this:
^I$
How do I remove them? I cannot find a regex to match them. (3 Replies)