09-20-2007
:)
thanks ,, yeah its workin ,, ,, i m gng to read bout awk now
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
grep "KeyNotFoundException" weblogic.log
After running this command the output is
abcxyzexceptions.KeyNotFoundException: Person not found
How to know ..what is the line number of the above string in the log file. (2 Replies)
Discussion started by: bishweshwar
2 Replies
2. Shell Programming and Scripting
Hi Unix gurus
Basically i am searching for the pattern and getting the line numbers of the grepped pattern. I am trying to print the series of lines from 7 lines before the grepped line number to the grepped line number.
I am trying to use the following code. but it is not working.
cat... (3 Replies)
Discussion started by: mohanm
3 Replies
3. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
4. Shell Programming and Scripting
I have a file with ~200K lines, I need to delete 4K lines in it. There is no range.
I do have the line numbers of the lines which I want to be deleted.
I did tried using
> cat del.lines
sed '510d;12d;219d;......;3999d' file
> source del.lines
Word too long.
I even tried... (2 Replies)
Discussion started by: novice_man
2 Replies
5. Shell Programming and Scripting
here is the content of input file
CREATE TABLE `bla bla bla` (
`allianceSiteId` int(11) DEFAULT NULL,
`trunkGroupsId` int(11) DEFAULT NULL,
`lastModified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY `allianceSiteId`... (4 Replies)
Discussion started by: vivek d r
4 Replies
6. Shell Programming and Scripting
Hi
I have a case where I am grabbing patterns and subsequent lines using
sed -n -e '/regex/{$!N;p;}'
This returns just the regex line when it is the last line of my file.
Now I may have even number of lines in some cases (regex never at end) and odd in very rare cases.
If the line... (6 Replies)
Discussion started by: jamie_123
6 Replies
7. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
8. Shell Programming and Scripting
hi Gurus,
I need separate a file which is one huge line to multiple lines based on certain number of charactors. for example:
abcdefghi high abaddffdd
I want to separate the line to multiple lines for every 4 charactors.
the result should be
abcd
efgh
i hi
gh a
badd
ffdd
Thanks in... (5 Replies)
Discussion started by: ken6503
5 Replies
9. Shell Programming and Scripting
Hi I have a file with over a million lines (rows) and I want to split everything from 500,000 to a million into another file (to make the file smaller). Is there a simple command for this?
Thank you
Phil (4 Replies)
Discussion started by: phil_heath
4 Replies
10. Shell Programming and Scripting
Dear All,
I have to solve the following problems with multiple tab-separated text file but I don't know how. Any help would be greatly appreciated. I have access to Linux mint (but not as a professional).
I have multiple tab-delimited files with the following structure:
file1:
1 44
2 ... (5 Replies)
Discussion started by: Bastami
5 Replies