10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
2. 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
3. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
4. 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
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
Hi,
I writing a shell program to remove the data from output of the find which matches a list in a file
I am using the below find command to get the list of files
x=`find . -name test*.dat`
the output of the find command is as follows
test1.dat
test2.dat
test3.dat
test4.dat... (4 Replies)
Discussion started by: pals70423
4 Replies
7. 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
8. Shell Programming and Scripting
Hi
I am facing the below problem.
I have set of lines in which i have to search for only the line which matches with the pattren "/" only.
input:-
/*+ some text */
/*+ some text */
/* Remove rows from a table of survey results. */
/* Add a survey respondent's name and answers. */
/*... (7 Replies)
Discussion started by: manasa_vs
7 Replies
9. Shell Programming and Scripting
Hello All,
I have a file which is having below type of data,
Jul 19 2011 | 123456
Jul 19 2011 | 123456
Jul 20 2011 | 123456
Jul 20 2011 | 123456
Here I wanted to grep for date pattern as below, so that it should only grep "Jul 20" OR "Jul ... (9 Replies)
Discussion started by: gr8_usk
9 Replies
10. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies