02-22-2007
Ok, let me be clear in my question.
A,1
B,2
C,3
D,4
E,5
If I search for C, then I should get output as below,
C,3
D,4
E,5
grep ^C file, is returning me only 1 row. It is not helping me.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to search files/directories in /temp directory which starts with letter 'a'. How can I do that using grep command.
I can find out like ls -ltr a* but I want to use grep command like ls -ltr | grep ..... like that.
Please help.
Malay (4 Replies)
Discussion started by: malaymaru
4 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
Please help me in the following dbt
i want to know the different files in the current and the sub directory which have some search key in that . for example
i want to know all filenames followed by the word 'unix' in all files.
the file name and the matching word have... (1 Reply)
Discussion started by: akhil313
1 Replies
3. Shell Programming and Scripting
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies
4. Shell Programming and Scripting
Let me give you a complete example what I am trying to achieve.
1. Below is the log file structure where I need 2,5 and 14th column of the logs after grepping through the linkId=1ddoic.
Log file structure:-
abc.com 20120829001415 127.0.0.1 app none11111 sas 0 0 N clk Mozilla/5.0... (3 Replies)
Discussion started by: kmajumder
3 Replies
5. Shell Programming and Scripting
Hi,
I am trying to do pattern search using grep command. But i donot know what mistake i'm doing. I am not getting the expected Result. could any one please help me out?
$ cat b.ksh
AasdjfhB
57834B
86234B
472346B
I want to print the line which is starting with either A or 8 and... (10 Replies)
Discussion started by: nikesh29
10 Replies
6. Shell Programming and Scripting
I am facing a problem while using the grep command in shell script. Actually I have one file (PCF_STARHUB_20130625_1) which contain below records.
SH_5.55916.00.00.100029_20130601_0001_NUC.csv.gz|438|3556691115
SH_5.55916.00.00.100029_20130601_0001_Summary.csv.gz|275|3919504621 ... (2 Replies)
Discussion started by: sumit.vedi1988
2 Replies
7. Linux
How to search multiple word using grep command
for example i want to reserch
ANJ001
AA
Using ridiculous font, size, and color changes instead of normal space separated text and CODE tags obfuscates what you are trying to do and makes it difficult for volunteers who may want to help you solve... (1 Reply)
Discussion started by: na.dharma
1 Replies
8. Shell Programming and Scripting
I 'm writing a script to search particular strings from log files. The log file contains lines start with *. The file may contain many other lines start with *. I need to search a particular line from my log file. The grep command is working in command line , but when i run my script, Its printing... (7 Replies)
Discussion started by: vinus
7 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Let's say if we have a file with a lot of information.
For example:
iiadam
otterhedgehog
kayleigh... (2 Replies)
Discussion started by: ForeignGuy
2 Replies
10. Shell Programming and Scripting
One more question:
I want to grep "COS_12_TM_4 pattern from a file look likes :
"COS_12_TM_4" " ];I am taking scan_out as the input from the user.
How to search "COS_12_TM_4" in the file which is corresponds to scan_out (12 Replies)
Discussion started by: Preeti Chandra
12 Replies