10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
This is my Scenario:
I wanted to check if a particular name or pattern is present in a file based of that rest of the program should proceed.
I want to print '0' if no matching found.
v_File_Count=`grep -i "$v_Name_Pattern" $File_Path/Master_File_List.txt | wc -l` The above command... (5 Replies)
Discussion started by: TechGyaann
5 Replies
2. Shell Programming and Scripting
How can I find the number of lines in a file excluding lines
starting with #? (4 Replies)
Discussion started by: kristinu
4 Replies
3. Shell Programming and Scripting
Dears,
i want cut the lines from a log file. Example of the log file as follows..
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMDeliverContrUtil isDeliverSM
FINE:
May 27, 2011 5:54:51 PM com.huawei.ivas.utilities.sm.client.SMUtil addSysUpMsgLog
INFO: . The message content... (1 Reply)
Discussion started by: tonypalokkaran
1 Replies
4. UNIX for Dummies Questions & Answers
how can I cut out partiluar lines like from line 233 to 347 ?
any idea? (2 Replies)
Discussion started by: kvok
2 Replies
5. AIX
hello everybody
i am looking for a shell to cut a flat file (with a long unique line) according to a certain number of characters and redirect every result to an output file.
here is an example
MyFile :
12 3 456 12 3 456 12 3 456 .....
and i took every 9-characters including BLANKS... (6 Replies)
Discussion started by: fastlane3000
6 Replies
6. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
7. Shell Programming and Scripting
Hi Everyone,
I have a file a.txt, inside is
Mon Jul 20 00:05:07 2009 12
Mon Jul 20 00:05:08 2009 1
The output should be a.txt, inside is
00:05:07 12
00:05:08 1
My method is
`cat a.txt | cut -f4,6 -d' ' > a.txt.tmp;mv -rf a.txt.tmp a.txt`;
Is any good way to do this? like perl... (5 Replies)
Discussion started by: jimmy_y
5 Replies
8. Shell Programming and Scripting
Hi
How do I find number of lines of a file? Below commands returned 0. But, the file is showing 20 lines when I open it in editplus tool. Each line contains 601 columns. Please advise
I want to incorporate some word at the begining of each of those 20 lines
-Somesh
$ wc -l <... (2 Replies)
Discussion started by: somesh_p
2 Replies
9. Shell Programming and Scripting
Hi ,
How about find the total number of lines in a file ?
How can i do that with the "grep" command ? (9 Replies)
Discussion started by: Raynon
9 Replies
10. Shell Programming and Scripting
All, I have a file that I want to read, cut 12 lines and direct into a new file, and continue to do this until I reach the EOF. How do I do it?
can I use cat or read to do this?
the file is formated with repetitive output consisting of these 12 lines
date: <Timestamp>
dev_id: <device ID>... (7 Replies)
Discussion started by: turk22
7 Replies