How to get fields and get output with awk or shell script.?
I have a flat file A.txt with field seperate by a pipe
How do we use awk or shell program to get output file B.txt
I hope you understand what i would like to get it from B.txt
Thanks.
I've got a file with each record on a separate line and each record contains 34 fields separated by a colon and i'm trying to re-arrange the order of the fields and merge together certain fields separated by a slash (like field7/field28). I tried using an awk print statement like
awk -F: 'BEGIN... (5 Replies)
Hi everyone,
I'm trying to use the "join" function for more than 1 field. Since it's not possible as it is, I want to take my input files and concatenate the joining fields as 1 field (separated by "|"). I wrote 2 awk script to do and undo it (see below). However I'm new to awk and I'm certain I... (5 Replies)
Hi All,
Looking for a quick AWK script to output some differences between two files.
FILE1
device1 1.1.1.1 PINGS
device1 2.2.2.2 PINGS
FILE2
2862 SITE1 device1-prod 1.1.1.1 icmp - 0 ... (4 Replies)
Diff output as follows:
< AAA BBB CCC DDD EEE 123
> PPP QQQ RRR SSS TTT 111
> VVV WWW XXX YYY ZZZ 333
> AAA BBB CCC DDD EEE 124
How can i use awk to compare the last field to determine if the counter has increased, and need to ensure that the first 4 fields must have the same... (15 Replies)
Hello Gurus !
I have what probably amounts to a few simply changes to fix; however for the life of me I cannot seem to get it ti work. I need to align the output of my script (I am writing to a logfile)... here's the lines in my code:
if
then
echo "NODE: $node" >> $logfile... (6 Replies)
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 Replies)
Hello All,
I have many zipped XMLs (example file name in tgz formate - file_rec.trx.2016-01-23.000123.exc.85sesdzd45wsds5299c8f2994f7.tgz) looks following and I need to verify two numbers, they are RecordNumber and EnrolData (only sequence number, NOT hole).
for all the records, both should be... (5 Replies)
I/m a beginner so be easy. I have text files that live on an AIX server. The files come in and I've been charged with writing a shell script to email out that pulls the first date, and the last date of the file. I need to load these 2 dates into 2 separate variables. I can figure out the variables,... (13 Replies)
In the below awk I am trying output to one file those lines that match between $2,$3,$4 of file1 and file2 with the count in (). I am also trying to output those lines that are missing between $2,$3,$4 of file1 and file2 with the count of in () each. Both input files are tab-delimited, but the... (7 Replies)
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT V7
brk
BRK(2) System Calls Manual BRK(2)NAME
brk, sbrk, break - change core allocation
SYNOPSIS
char *brk(addr)
char *sbrk(incr)
DESCRIPTION
Brk sets the system's idea of the lowest location not used by the program (called the break) to addr (rounded up to the next multiple of 64
bytes on the PDP11, 256 bytes on the Interdata 8/32, 512 bytes on the VAX-11/780). Locations not less than addr and below the stack
pointer are not in the address space and will thus cause a memory violation if accessed.
In the alternate function sbrk, incr more bytes are added to the program's data space and a pointer to the start of the new area is
returned.
When a program begins execution via exec the break is set at the highest location defined by the program and data storage areas. Ordinar-
ily, therefore, only programs with growing data areas need to use break.
SEE ALSO exec(2), malloc(3), end(3)DIAGNOSTICS
Zero is returned if the break could be set; -1 if the program requests more memory than the system limit or if too many segmentation regis-
ters would be required to implement the break.
BUGS
Setting the break in the range 0177701 to 0177777 (on the PDP11) is the same as setting it to zero.
ASSEMBLER
(break = 17.)
sys break; addr
Break performs the function of brk. The name of the routine differs from that in C for historical reasons.
BRK(2)