hi;
i have a file containing lines like:
1|1069108123|96393669788|00963215755711|2|0|941||;serv:Pps6aSyria;first:0;bear
i want to extract the second, third and fourth record of each line and store it in a file ";" seperated
this is what i wrote
while read line
do
... (3 Replies)
I am a newbie to awk and c programming, however am not a unix newbie. However, I do need help with a kshell script I am writing. It is almost complete, the last step is killing me. Any help would be greatly appreciated. What I am trying to do is cat a text file that has usernames. Then, using... (2 Replies)
Hi,
I'm new with this stuff, but I hope you can help me.
This is what I'm trying to do:
for id in $var; do
awk '{if ($1 == $id) print $2}' merg_data.dat > neigh.tmp
done
I need that for every "id", awk search the first column of the file merg_data.dat which contains "id" and... (3 Replies)
I am writing a script where I need awk to test if two columns are the same and shell to do something if they are or are not.
Here is the code I'm working with:
@ test = 0
...
test = `awk '{if($1!=$2) print 1; else print 0}' time_test.tmp`
#time_test.tmp holds two values separated by a space... (3 Replies)
Hi All,
I am new to AWK programming. I have the following for loop in my awk program.
cat printhtml.awk:
BEGIN
-------- <some code here>
END{
----------<some code here>
for(N=0; N<H; N++)
{
for(M=5; M<D; M++) print "\t" D "";
}
-----
}
... (2 Replies)
Hello All,
May i please why my shell variable is not getting passed into awk script.
#!/bin/bash -vx
i="1EB07C50"
/bin/awk -v ID="$i" '/ID/ {match($0,/ID/);print substr($0,RSTART,RLENGTH)}' /var/log/ScriptLogs/keys.13556.txt
Thank you. (1 Reply)
I have file called in in.txt contains with the below lines I want to display the lines between the value which I would be passing.
one
two
three
four
five
ten
six
seven
eight
Expected output if I have passed one and ten
two
three
four
five (8 Replies)