10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the below awk in the first step I default Classification NF-1 to VUS. Next, I am trying to change the value of Classification (NF) to whatever CLINSIG (NF-1) is. If there is only one condition everything works great, but if there are two conditions it does not work. Is the syntax used... (4 Replies)
Discussion started by: cmccabe
4 Replies
2. Shell Programming and Scripting
There are 4 ways the user can input data and unfortunately the parse rules for each are slightly different. The first condition works great and the input file is attached for the second condition. Conditions 3 and 4 will follow I'm sure I will have trouble with them and need help as well. The... (9 Replies)
Discussion started by: cmccabe
9 Replies
3. Shell Programming and Scripting
I have a log file that contains many lines but contains the following line three times:
related_pin : "t_bypass";
Here are the 3 occurrences and the two lines after from my file.txt:
related_pin : "t_bypass";
sdf_cond : "rstq_b";
timing_sense : negative_unate;
... (6 Replies)
Discussion started by: bobbygb2003
6 Replies
4. Shell Programming and Scripting
Want to fetch a column with multiple pattern using awk.
How to achieve the same.
Tried
cat test
address : 10.63.20.92/24
address : 10.64.22.93/24
address : 10.53.40.91/24
cat test | awk '{print $3}' |awk -F "/" '{print $1}'
10.63.20.92
10.64.22.93
10.53.40.91
Is there any... (2 Replies)
Discussion started by: Manasa Pradeep
2 Replies
5. Shell Programming and Scripting
Need to remove rest of line after the equals sign on search pattern from the searchfile. Can anybody help. Couldn't find any similar example in the forum:
infile:
64_1535: Delm. = 86 var, aaga
64_1535: Fran. = 57 ex. ccc
64_1639: Feb. = 26 (link). def
64_1817: mar. = 3/4. drz ... (7 Replies)
Discussion started by: sdf
7 Replies
6. 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
7. Shell Programming and Scripting
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Discussion started by: sdf
10 Replies
8. Shell Programming and Scripting
Hi
I am trying to search and replace a multi line pattern in a php file using awk.
The pattern starts with
<div id="navbar">
and ends with
</div>
and spans over an unknown number of lines.
I need the command to be a one liner.
I use the "record separator" like this :
awk -v... (8 Replies)
Discussion started by: louisJ
8 Replies
9. Shell Programming and Scripting
how can i specify more than 1 consition in the following AWK statament??
i.e. if $2 is ABCD and $3 is MNOP and $4 is KLPM
similarly for OR
#!/bin/ksh
awk -F '' ' $2 == "ABCD" { print $2, $3;}' file.xml (2 Replies)
Discussion started by: skyineyes
2 Replies
10. Shell Programming and Scripting
Hi,
filenames:
contains name of list of files to search in.
placelist
contains the names of places to be searched in all files in "filenames"
for i in $(<filenames)
do
egrep -f placelist $i
if ]
then
echo $i
fi
done >> outputfile
Output i am getting: (0 Replies)
Discussion started by: pinnacle
0 Replies