10-13-2008
thanks franklin! will try it!
oh im using the default field separator (space)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have this input file ..
BSS01 107 Swafieh 11/06/2008 12:06:57
BSS01 111 Ramada_Hotel 12/06/2008 11:37:20
BSS01 147 Kalha_Rep 11/06/2008 19:13:39
BSS01 147 Kalha_Rep ... (9 Replies)
Discussion started by: yahyaaa
9 Replies
2. Shell Programming and Scripting
Hi All,
I would like my code to be able to print out the whole line if 1st field has a dot in the number. Sample input and expected output given below.
My AWK code is below but it can;t work, can any expert help me ?
Thanks in advance.
{if ($1 ~ /*\.*/) { print $0 }}
Input:
... (2 Replies)
Discussion started by: Raynon
2 Replies
3. Shell Programming and Scripting
Friends,
I have .txt file with 3 millions of rows.
File1.txt
ABC1|A|ABCD1|XYZ1
ABC2|P|ABCD2|XYZ2
ABC3|A|ABCD3|XYZ3
ABC4|P|ABCD4|XYZ4
If second field has value P then print the entire line.
Thanks in advance for your help,
Prashant (4 Replies)
Discussion started by: ppat7046
4 Replies
4. Shell Programming and Scripting
Hi all,
I got several lines line this
a b c d e 1 e
a 1 c d e 3 f
a b c 1 e 8 h
a b c d e 1 w
a 1 c d e 2 w
a b c d e 1 t
a b c d e 7 4
How can I print the line if 1 is the field one before the last field?
Basicly this 2 field ?
a b c d e 1 e
a b c d e 1 t
The file I got is... (7 Replies)
Discussion started by: stinkefisch
7 Replies
5. UNIX for Advanced & Expert Users
let's say you have
dog, cat, 1, 2, 3
reverse, 7, 9, i, tell, you
you want to print
3, 2, 1, cat, dog
you, tell, i, 9, 7, reverse
The delimiter is a comma. The number of commas in each line though is undetermined.
How would you do this using either regular UNIX or awk? I know the... (5 Replies)
Discussion started by: Josef_Stalin
5 Replies
6. Shell Programming and Scripting
Similar question... I have a space delimited text file and I want to only print the lines where the 3rd word/field/column is equal to "01"
awk '{if $3 = "01" print $0}'
something like this.
I meant to say:
only print line IF 3rd field is 01 (2 Replies)
Discussion started by: ajp7701
2 Replies
7. Shell Programming and Scripting
plz help me!!
I have this file ,
3408 5600
3796 6035
4200 6285
4676 0
40 1554
200 1998
652 2451
864 2728
1200 0
I want it like if $2==0,replace it with field from the previous line+500
say here the o/p would be like
3408 5600
3796 6035
4200 6285... (16 Replies)
Discussion started by: Indra2011
16 Replies
8. Shell Programming and Scripting
i want to print lines in a file that the 1st field of each line has a Date shape such:
yy/mm/dd
or on the other hand contains slash "/" . (1 Reply)
Discussion started by: oreka18
1 Replies
9. Shell Programming and Scripting
Hi Guys,
I have the file
---
HOST_NAME,data_coleta,data_carga,CPU_util,CPU_idle,run_queue,memory,MEMORY_SYSTEM,MEMORY_TOTAL,MEMORY_SWAPIN,MEMORY_SWAPOUT,DISK_READ,DISK_WRITE,DISK_IO,NET_IN_PACKET,
NET_OUT_PACKET... (4 Replies)
Discussion started by: antoniorajr
4 Replies
10. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
LEARN ABOUT CENTOS
perf-mem
PERF-MEM(1) perf Manual PERF-MEM(1)
NAME
perf-mem - Profile memory accesses
SYNOPSIS
perf mem [<options>] (record [<command>] | report)
DESCRIPTION
"perf mem -t <TYPE> record" runs a command and gathers memory operation data from it, into perf.data. Perf record options are accepted and
are passed through.
"perf mem -t <TYPE> report" displays the result. It invokes perf report with the right set of options to display a memory access profile.
OPTIONS
<command>...
Any command you can specify in a shell.
-t, --type=
Select the memory operation type: load or store (default: load)
-D, --dump-raw-samples=
Dump the raw decoded samples on the screen in a format that is easy to parse with one sample per line.
-x, --field-separator
Specify the field separator used when dump raw samples (-D option). By default, The separator is the space character.
-C, --cpu-list
Restrict dump of raw samples to those provided via this option. Note that the same option can be passed in record mode. It will be
interpreted the same way as perf record.
SEE ALSO
perf-record(1), perf-report(1)
perf 06/30/2014 PERF-MEM(1)