Gurus,
I am struggling with a issue and thought I could use some of your expertise.
Need Help with this
I have a flat file that has millions of records
24|john|account ~ info |56|
25|kuo|account ~ journal |58|
27|kim|account ~ journal |59|
28|San|account ~
journal |60|... (3 Replies)
Hi All,
I need the command to join 2 lines into one. I found lots of threads but none give me the sollution. Probably because unix scripting is one of my best features ;)
I got a logfile where line 2 needs to be joined with line 1, lines 4 needs to be joined with line 3 etc
If you need... (16 Replies)
Hi Guys,
Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated.
Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n"
TIME SERVER/CLIENT TEXT... (6 Replies)
Hello,
I'm trying to write a piece of code in awk, which should be able recognize by some regexps two lines and then join them together (maybe write them without \n would be enough, I don't know).. the thing is that every line in the file i'm working with starts with some number, for example:
... (4 Replies)
Hi All
I'm struggling a bit here :(
I need a way of joining lines contained in a text file. I've seen numerous SED and AWK examples and none of them seem to be working for me.
The text file has 4 lines:
DELL1427
DOC
30189342
79
Now bear with me on this one as I'm actually... (4 Replies)
I have a plain test file with a delimeter ''. In this file some lines are broken into two. The first part of these broken line will have 6 columns and the second part will have 4. These broken lines will be consicutive.
I want to join the two consicutive lines which are having 6 fields and 4... (8 Replies)
Hi,
I need to join every alternate line in a file
for eg:input file
$ cat abc
abc
def
ghi
jkloutput
abc def
ghi jklcode i wrote for this
$ cat add_line.pl
#!/usr/bin/perl -w
my $count=1;
#my $line=undef;
my @mem_line;
my $i=0;
my $x=0; (2 Replies)
Hi all,
I'm excited to the part of unix.com forum, and noob to it.
I have an query, where I have an file and it contains data like this
use
thread
when
posting
do
no
I was expecting the result as
use thread
thread when
when posting
posting do
do no
use thread when
thread when... (6 Replies)
Hi - I have req to join broken lines and remove empty lines but should NOT be in one line. It has to be as is line by line. The challenge here is there is no end of line/start of line char.
thanks in advance
Source:-
2003-04-34024|04-10-2003|Claims|Claim|01-13-2003|Air Bag:Driver;... (7 Replies)
Hi Folks,
I have a file with fields as follows which has last field in multiple lines. I would like to combine a line which has three fields with single field line for as shown in expected output. Please help.
INPUT
hname01 windows appnamec1eda_p1, ... (5 Replies)
Discussion started by: shunya
5 Replies
LEARN ABOUT CENTOS
wait3
WAIT4(2) Linux Programmer's Manual WAIT4(2)NAME
wait3, wait4 - wait for process to change state, BSD style
SYNOPSIS
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
pid_t wait3(int *status, int options,
struct rusage *rusage);
pid_t wait4(pid_t pid, int *status, int options,
struct rusage *rusage);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
wait3():
_BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
wait4():
_BSD_SOURCE
DESCRIPTION
These functions are obsolete; use waitpid(2) or waitid(2) in new programs.
The wait3() and wait4() system calls are similar to waitpid(2), but additionally return resource usage information about the child in the
structure pointed to by rusage.
Other than the use of the rusage argument, the following wait3() call:
wait3(status, options, rusage);
is equivalent to:
waitpid(-1, status, options);
Similarly, the following wait4() call:
wait4(pid, status, options, rusage);
is equivalent to:
waitpid(pid, status, options);
In other words, wait3() waits of any child, while wait4() can be used to select a specific child, or children, on which to wait. See
wait(2) for further details.
If rusage is not NULL, the struct rusage to which it points will be filled with accounting information about the child. See getrusage(2)
for details.
RETURN VALUE
As for waitpid(2).
ERRORS
As for waitpid(2).
CONFORMING TO
4.3BSD.
SUSv1 included a specification of wait3(); SUSv2 included wait3(), but marked it LEGACY; SUSv3 removed it.
NOTES
Including <sys/time.h> is not required these days, but increases portability. (Indeed, <sys/resource.h> defines the rusage structure with
fields of type struct timeval defined in <sys/time.h>.)
On Linux, wait3() is a library function implemented on top of the wait4() system call.
SEE ALSO fork(2), getrusage(2), sigaction(2), signal(2), wait(2), signal(7)COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2012-09-23 WAIT4(2)