10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
2. 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
3. UNIX for Dummies Questions & Answers
Hello All,
I was wondering if there is a way to execute a command in my ".bashrc" file based on how I logged into the PC?
I was thinking maybe there is a way to check how the user (*myself) logged in, maybe somehow with the who command along with something else, but I'm not sure... I know I... (7 Replies)
Discussion started by: mrm5102
7 Replies
4. 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
5. UNIX for Advanced & Expert Users
Could someone please tell me how to search the entire man pages? I know man -k whatever searched the description but I wanna search the entire man page. (8 Replies)
Discussion started by: cokedude
8 Replies
6. UNIX for Advanced & Expert Users
Hi guys, I need your help to use advance grep command, In my example below, I have 5 container which has some information on it, and I need to grep specific word "PLMNCode=454F00" which will not only grep the line contains that word, but I need to print the output for the whole container.
Input... (6 Replies)
Discussion started by: hapalon
6 Replies
7. UNIX for Dummies Questions & Answers
Sorry for the title, I really don't know how to word this question or what to even search for. I tried "grep one match", "grep 1 match", "stop grep" on both google and here and haven't found something that helps, so here I go:
I have a file that's about 1.5 million lines long, every line looks... (3 Replies)
Discussion started by: rmoakler
3 Replies
8. Shell Programming and Scripting
I'm having problems since few days ago, and i'm not able to make it works with a simple awk+grep script (or other way to do this).
For example, i have a input file1.txt:
cat inputfile1.txt
218299910417
1172051195
1172070231
1172073514
1183135117
1183135118
1183135119
1281440202
... (3 Replies)
Discussion started by: poliver
3 Replies
9. UNIX for Dummies Questions & Answers
Is there any command, so I can retrieve all the records in a file from the first occurance of a search string, within that file? (4 Replies)
Discussion started by: videsh77
4 Replies
10. 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