10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file similar to the below. I am selecting only the paragraphs with @inlineifset.
I am using the following command
sed '/@inlineifset/,/^ *$/!d;
s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln
This produces
@section Correlations between
seismograms,,,,}}
... (5 Replies)
Discussion started by: Danette
5 Replies
2. Shell Programming and Scripting
Hello folks!
I got a list with about 880 lines. An example line looks like this:
attr1=sample,attr2=sample,attr3=sample,email=example@example.org;
EMAIL=example@example.org,attr3=sample,attr4=sample,attr5=sample,... (3 Replies)
Discussion started by: Chugger
3 Replies
3. Shell Programming and Scripting
I am trying to grep a variable with multiple lines with multiple patterns
below is the pattern list in a variable called "grouplst", each pattern is speerated by "|"
grouplst="example1|example2|example3|example4|example5|example6|example7"
I need to use the patterns above to grep a... (2 Replies)
Discussion started by: ajetangay
2 Replies
4. Shell Programming and Scripting
Hi Experts,
I have a log file like this.I need to filter the Index name and elapsed time(only created ).
06:36:39 SQL> create index XYZ_F75 on XYZ
06:36:39 2 ("GRP_ID", "_ID") parallel 64 nologging
06:36:39 3 tablespace XARGS_IDX
06:36:39 4 ;
Index created.
Elapsed:... (2 Replies)
Discussion started by: navsan420
2 Replies
5. Shell Programming and Scripting
Hi,
I don't script often enough to know how to do this, and I can't seem to find a right example online. I have a csv output from an old, old system (Win2K???), from which I want to extract only certain fields. Initially I came up with something like this:
cat file1 | awk -F '"' '{print $8... (7 Replies)
Discussion started by: takada
7 Replies
6. Shell Programming and Scripting
Hello guys,
I have been looking around but can't find the answer to my problem:
If the grep command displays no results, print "no results have been found" and increment x. But if the grep command find something, do nothing.
if
echo "no results have been found $x"
x=`expr $x + 1 `... (3 Replies)
Discussion started by: Benou
3 Replies
7. UNIX for Dummies Questions & Answers
I have a file with the following text:
grep \$
grep \\$
grep \\\$
grep '\$'
grep '\'$'
grep \\
grep \\\\
grep "\$"
grep '"$'
grep "$"
When I perform these same commands on this file, the result are never what I would expect them to be. Could someone please comment on the results and... (3 Replies)
Discussion started by: uran101
3 Replies
8. Shell Programming and Scripting
Hi All,
I've been trying solve this with a simple command but not having much luck. I have a file like this:
Line 1: random_description 123/alert/high random_description2 356/alert/slow
Line 2: random_description3 654/alert/medium
Line 3: random_description4 234/alert/critical
I'm... (7 Replies)
Discussion started by: joe19
7 Replies
9. Shell Programming and Scripting
I need a simple script to get all lines between 2 Patterns,
e.g.
.............
.............
114456723: testing Script
Alpha
Beta
114459234: testing Done
.............
.............
It should give all the lines in between 114456723 and 114459234, including these as well.
Any... (2 Replies)
Discussion started by: gurpreet470
2 Replies
10. Shell Programming and Scripting
Hi All,
I have a file. I need to find multiple patterns in a row and need those rows to divert to new file.
I tried using grep -e / -E / -F options as given in man.
But its not working.
==> cat testgrep.txt
william,fernandes,xxxxx
mark,morsov,yyyy
yy=,xx=
yyyy=,xxxx==
==>... (7 Replies)
Discussion started by: WillImm123
7 Replies