I need to come back one line in awk when i detect a regular expression, i'm working with this:
when i found the line that matches with <\/POLITIC> i need to come back one line, the opposite of getline that takes a new line and continue executing the code in the same line, i need to come back one line and continue executing the code with this new line.
My approach when I need to do this is to pass the file name twice to the script. On the first pass write the line numbers you are interested in to an array. On the second pass do your processing.
Hi all,
I used to post here years ago, and was a moderator, my old username: zazzybob.
Anyway, after a few years away focusing on my career, I'm back and keener than ever to get involved in the unix.com community again.
I'm looking forward to getting back into the swing of things, helping... (11 Replies)
Can somebody help me with this? I'm sure it's a no-brainer if you know awk... but I don't.
Input:
Blah
Blah
Me love you
long time
Blah
Blah
awk magic with 'long time'
==>
Output:
Blah
Blah
Me love you long time (0 Replies)
Hi every body,
Is it possible to connect two servers Back-to-Back (Point-to-Point) using HBA adapters & using Fiber.
Note it is direct connection & there is no switches between the servers.
I'm concern about using HBA adapters, it is possible or not.
Thanks in advance. :) (3 Replies)
I want to receive a value back into shell script from awk code block.
for example - I want to use the substring value from the awk script inside the shell code's scope.
do
dir=`dirname $file`;
echo | awk '{print substr("'"${dir}"'",'$pathlength')}';
done
can someone guide me how to... (2 Replies)
I am passing a varaible to from Shell to awk then I am doing some maniplation for that variable inside awk. I want that maniplated variable value back to shell , Is this possible .Please let me know. (12 Replies)
Hi this is Ramana.sv new to this group, please help me about my question,
i am using HP-UX11.11i with oracle 10G this server is in india and i have another server in US with same HP-UX with oracle10G, what i want is i want to rename the local database in local HP server and copy the database from... (0 Replies)
Can anyone please tell me how safe is the following backup script?
Does it really backing up the WHOLE system or just part of it?
I do that with the system running an oracle database.
Will I be able to restore the system in case of a fault?
<pre>
Here is the output of 'df -k'
... (11 Replies)