Hello, I have only recently begun with awk and need to write this:
I have an input consisting of a couple of letters, a space and a number followed by various other characters:
fiRcQ 9( [various data ])
klsRo 9( [various data ]) pause
fiRcQ 9( [various data ]) pause
klsRo continue 1
aPLnJ 62( [various data ])
fiRcQ continue 5
... and so on
I want an output where each pause would be followed by a continue with the same key identifier:
fiRcQ 9( [various data ])
klsRo 9( [various data ]) pause klsRo continue 1
fiRcQ 9( [various data ]) pause fiRcQ continue 5
aPLnJ 62( [various data ])
So the algorithm would be something along the lines of:
I know what I want to do, but being a total newbie in awk, I have no idea how the syntax would look like.
Hi,
I have a html file which is unformatted and need to concatenate the lines between each "table" statement in order to run an awk statement on it. Here is the example of the raw file:
<table border="0" cellspacing="0" cellpadding="0" class="playerDetails">
def
... (3 Replies)
hi
My requirement is i have a file with some records like this
file name ::xyz
a=1
b=100,200
,300,400
,500,600
c=700,800
d=900
i want to change my file
a=1
b=100,200,300,400
c=700,800
d=900
if record starts with " , " that line should fallows the previous line.please give... (6 Replies)
I made a script that can swap info on two lines using a combination of awk and sed, but was hoping to consolidate the script to make it run faster. If found this script, but can't seem to get it to work in a bash shell. I keep getting the error "Too many {'s". Any help here would be appreciated:... (38 Replies)
Hi,
I have put a similar question in one of the other threads through which I got the solution shown below but I have some more condition to add to it, hence have further queries on it. I appologies if I should be putting this with the old thread.
I have a file which perform a grep on the... (1 Reply)
For example:
File 1:
abc def ghi
jkl mno pqr
File 2:
stu vwx yza
bcd efg hij
klm nop qrs
I want the reult to be:
abc def ghistu vwx yza
jkl mno pqrbcd efg hij
klm nop qrs (4 Replies)
Hi,
I'm attempting to join two lines in a file which are separated by a line break. The file contents are shown below:
event_id=0
id=0_20100505210853
IFOconfig=HLV
template=TaylorF2
Nlive=1000.0
Nruns=1.0
NIFO=3... (7 Replies)
Hi,
I have an ASCII text file where some of the lines are ending with '+' character.
I have to concatenate the next successive line with those lines having the trailing '+' char by removing that char.
The below awk code has some problems to do this task:
awk '{while(sub(/\+$/,"")) {... (12 Replies)
Hi
I'm quite new with linux.
Very simple, I need to swap every 2 lines in a file.
Example
INPUT:
a a a
b b b
x x x
y y y
s s s
t t t
OUTPUT:
b b b
a a a
y y y
x x x
t t t (5 Replies)
Hi,
I need to concatenate some lines in a file based on the First 4 coloumns of a file .. (For Eg.)
Consider a file ...
I,01,000002,0666,00000.00,000,00,000,000, ,0
I,01,000002,0667,00000.00,000,00,000,000, ,0
I,01,000002,0666,00056.10
I,01,000002,0667,00056.10
I,01,000002,0666,00001... (6 Replies)
I have a data of 1 lac lines with the following format
abcde,1,2,3,4,
,ee
,ff
,gg
,hh
,mm
abcde,3,4,5,6,
,we
,qw
,as
,zx
,cf
abcde,1,5,6,7,
,dd
,aa
,er
....
.... (6 Replies)
Discussion started by: aravindj80
6 Replies
LEARN ABOUT OSF1
pause
pause(3) Library Functions Manual pause(3)NAME
pause - Suspends a process until it receives a signal
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <unistd.h>
int pause( void );
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
pause(): POSIX.1, XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The pause() function suspends the calling process until it receives a signal whose action is either to execute a signal-catching function
or terminate the process. The signal must be one that is acknowledged by the calling process. The pause() function does not affect the
action taken when a signal is received.
The pause() function suspends the calling process by suspending the calling thread. Other threads in the process, if any, are not sus-
pended.
RETURN VALUES
When the received signal causes the calling process to terminate, the pause() function does not return.
When the signal is caught by the calling process and control is returned from the signal-catching function, the calling thread resumes exe-
cution from the point of suspension. At that point, the pause() function returns a value of -1 and sets errno to indicate the error.
ERRORS
The pause() function sets errno to the specified values for the following conditions: The signal has been caught by the calling process and
control has been returned from the signal-catching function.
RELATED INFORMATION
Functions: kill(2), sigaction(2), sigvec(2), wait(2)
Routines: alarm(3)
Standards: standards(5) delim off
pause(3)