10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to check if my file has a line that does not start with '#' and has
1. Listen and 2. 443
echo "Listen 443" > test.out
grep 'Listen *443' test.out | grep -v '#'
Listen 443
The above worked fine but when the entry changes to the below the grep fails... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
hi anyone
how can use grep with wildcard. for example grep "sample?txt" filename doesn't show sample1txt or grep "sample*txt" filename doesn't show sample123.txt that there is in filename.
many thanks
samad (12 Replies)
Discussion started by: abdossamad2003
12 Replies
3. Shell Programming and Scripting
GNU grep with Oracle Linux 6.3
I want to grep for strings starting with the pattern ora and and having the words r2j in it. It should return the lines highlighted in red below.
But , I think I am not using wildcard for multiple characters correctly.
$ cat someText.txt
ora_pmon_jcpprdvp1... (3 Replies)
Discussion started by: kraljic
3 Replies
4. Shell Programming and Scripting
How can i grep for a pattern with wildcard using grep?
I want to identify all the lines that start with SAM and end in .PIPE
IN.TXT
SAM_HEADER.PIPE
SAM_DETAIL.PIPE
SAM_INVOICE.PIPE
Can i do something like
grep SAM*.PIPE IN.TXT (2 Replies)
Discussion started by: venky338
2 Replies
5. Shell Programming and Scripting
Hi,
I'm on a Linux machine with a bash shell. I have some apache logs from where I want to extract the lines that match this pattern :
"GET /dir1/dir2/dir3/bt_sx.gif HTTP/1.1"
but where "/dir1/dir2/dir3/bt_sx" may vary , so I would like to grep something like
cat apache.log | grep "\"GET... (2 Replies)
Discussion started by: black_fender
2 Replies
6. Shell Programming and Scripting
Hello everyone. I am new to unix, nice to meet you all.
I have a small problem with a question.
I have to write a command that finds all the postal codes in a txt file. All postal codes will begin on its own line in the txt file.
This is the formal of postal code: "A#A#A#" or "A#A #A#"
A... (3 Replies)
Discussion started by: leonmerc
3 Replies
7. Shell Programming and Scripting
Hi,
I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable..
for ex I have following values in my log file...
(DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED),
I want... (5 Replies)
Discussion started by: senthil3d
5 Replies
8. UNIX for Dummies Questions & Answers
How would I print the word "and" between the words "FOO" and BAR" using sed? My file has three words in it FOO and BAR. I only want the word "and".
Thanks every one. (7 Replies)
Discussion started by: tigta09
7 Replies
9. UNIX for Dummies Questions & Answers
I'm hoping that there is a way to do this. I'm sure I won't be able to get the answer I need on the deadline I need it...but at least I'll learn how to solve this problem.
I have a file that looks like this:
(00:14:25\$ head -27 QNHDSPACEDVR
Name: PollDhctAVFSInfo 00:0F:21:4B:00:6A
Name:... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
10. Shell Programming and Scripting
I have a file where in I need to add gctunit1/gtdivcompebb1/ after the = sign
for example:
gtfix31/gctunit_gtdivcompebb1/csclkswcompbypassstepgnnnh = gctunit1/gtdivcompebb1/csclkswcompbypassstepgnnnh (3 Replies)
Discussion started by: pitagi
3 Replies