10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to write a script that takes a file name in the form of Name_Num1_Num2.Extension and I want to separate the name portion and then use grep to see if that name part has any illegal characters in it.
I already have my grep command written and it works, I'm not sure how to separate the... (5 Replies)
Discussion started by: steezuschrist96
5 Replies
2. Shell Programming and Scripting
Thanks a lot for the code and the explanation.
Now my final requirement.
I have uploaded 3 files as attachment. Please open the files in Editplus or any other text editor which keeps the formatting.
GMDCOM.27936.log.txt------I want to pick only Process request from this file.(Please check... (9 Replies)
Discussion started by: ghosh_tanmoy
9 Replies
3. UNIX for Dummies Questions & Answers
Alright, here's the deal. I'm running the following ruby script (output follows):
>> /Users/name/bin/acweather.rb -z 54321 -o /Users/name/bin -c
Clouds AND Sun 57/33 - Mostly sunny and cool
I want to just grab the "57/33" portion, but that's it. I don't want any other portion of the line. I... (5 Replies)
Discussion started by: compulsiveguile
5 Replies
4. Shell Programming and Scripting
Hi,
This is more a theoretical question, because I usually solved that with perl or even java, but I would like to know if it exists an easy way to do it with SED.
Using regular expresions it's very easy to select an portion line. Does it exist an easy way for printing those portions in SED?... (1 Reply)
Discussion started by: islegmar
1 Replies
5. UNIX for Advanced & Expert Users
I want to grep a portion of the log file. grepping a particular pattern and including 10 lines before that and after that occurence.
grep -n "SomeString Pattern" filename
10 lines before this occurence and 10 lines after that.
Please help. Need the simple script not in awk or sed. (9 Replies)
Discussion started by: sainipardeep
9 Replies
6. Shell Programming and Scripting
Dear Friends,
Here I am with another difficulty. I have a flat file from which I wanna grep following pattern.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Statement Date : Blah blah
Blah blah
Blah blah
Blah blah... (1 Reply)
Discussion started by: anushree.a
1 Replies
7. Shell Programming and Scripting
Hi,
I am facing a little problem...
I have a line like this :
asdcvashfasashXXXXxxxzxcadd:sdcashjqdasdsmgdkdaxdsnd;
I want to print just a portion of line i.e starting from left 5 characters from ":" and upto ";" i.e. in this case it would be
"xcadd:sdcashjqdasdsmgdkdaxdsnd;"
The length of... (2 Replies)
Discussion started by: vanand420
2 Replies
8. Shell Programming and Scripting
Hi all,
I am new to awk programs.I have a file like this
1234567@2345||adcbdefhij: asgdfdasdfhhfd-asdfasd-dsfasdf |0.678|0.0|0.213
1234567@2345||adcbdefhij: ashhfd-asdfasd-dsfasdf |0.129|0.0|0.411
1234567@2345||adcbdefhij: asd-aasd-dasdf |0.223|0.0|0.276
I want to delete the text which... (3 Replies)
Discussion started by: Loy81
3 Replies
9. UNIX for Dummies Questions & Answers
hi,
I'm trying to use sed to erase everything, up to the first parenthesis. for example:
input: blah blah blah (aldj) test (dafs) test test.
output: (aldj) test (dafs) test test.
how would i do this?
I was fooling around with the parenthesis, and i only got it to apply on all parenthesis.... (1 Reply)
Discussion started by: gammaman
1 Replies
10. UNIX for Dummies Questions & Answers
hi,
I'm trying to use sed to erase everything, and including the ending parenthesis. For example:
input: blah blah blah (12355)this is what i want.
output: this is what i want.
how would i do this?
i found an example online that does the opposite:
sed \"s|test.*||g\" file1 > file2";
... (5 Replies)
Discussion started by: gammaman
5 Replies