Hi all,
in my csv file it'll look like this, and of course it may have more columns
US to UK;abc-hq-jcl;multimedia
UK to CN;def-ny-jkl;standard
DE to DM;abc-ab-klm;critical
FD to YM;la-yr-tym;standard
HY to MC;la-yr-ytm;multimedia
GT to KJ;def-ny-jrt;critical
I would like to group... (4 Replies)
Hi,
My input file is
$cat samp
1 siva
1 raja
2 siva
1 siva
2 raja
4 venkat
i want sort this name wise...alos need to remove duplicate lines.
i am using
cat samp|awk '{print $2,$1}'|sort -u
it showing
raja 1 (3 Replies)
My scenario is that I need to pick value from third column based on fourth column value, if fourth column value is 1 then first value of third column.Third column (2|3|4|6|1) values are cancatenated.
Main imp point, in my .csv file, third column is having price value with comma (1,20,300), it has... (2 Replies)
hello, I have a large file (about 1gb) that is in a file similar to the following:
I want to make it so that I can put all the duplicates where column 3 (delimited by the commas) are shown on top. Meaning all people with the same age are listed at the top.
The command I used was ... (3 Replies)
I have a .CSV file with the below format:
"column 1","column 2","column 3","column 4","column 5","column 6","column 7","column 8","column 9","column 10
"12310","42324564756","a simple string with a , comma","string with or, without commas","string 1","USD","12","70%","08/01/2013",""... (2 Replies)
input.csv:
Field1,Field2,Field3,Field4,Field4
abc ,123 ,xyz ,000 ,pqr
mno ,123 ,dfr ,111 ,bbb
output:
Field2,Field4
123 ,000
123 ,111
how to fetch the values of Field4 where Field2='123'
I don't want to fetch the values based on column position. Instead want to... (10 Replies)
Hello everyone,
I am using ksh on Solaris 10 and I'm gathering data in a CSV file that looks like this:
20170628-23:25:01,1,0,0,1,1,1,1,55,55,1
20170628-23:30:01,1,0,0,1,1,1,1,56,56,1
20170628-23:35:00,1,0,0,1,1,2,1,57,57,2
20170628-23:40:00,1,0,0,1,1,1,1,58,58,2... (6 Replies)
Hi,
I tried filtering the records in a csv file using "awk" command listed below.
awk -F"~" '$4 ~ /Active/{print }' inputfile > outputfile
The output always has all the entries.
The same command worked for different users from one of the forum links.
content of file I was... (3 Replies)
I have to sort the 4th column of an excel/csv file. I tried the following command
sort -u --field-separator=, --numeric-sort -k 2 -n dinesh.csv > test.csv
But, it's not working. Moreover, I have to do the same for more than 30 excel/csv file. So please help me to do the same. (6 Replies)
Discussion started by: dineshkumarsrk
6 Replies
LEARN ABOUT DEBIAN
dpkg-awk
DPKG-AWK(1) General Commands Manual DPKG-AWK(1)NAME
dpkg-awk - Utility to read a dpkg style db file
SYNOPSIS
dpkg-awk [(-f|--file) filename] [(-d|--debug) ##] [(-s|--sort) list] [(-rs|--rec_sep) ??] '<fieldname>:<regex>' ... -- <out_fieldname> ..
DESCRIPTION
dpkg-awk Parses a dpkg status file (or other similarly formatted file) and outputs the resulting records. It can use regex on the field
values to limit the returned records, it can also be told which fields to output, and it can sort the matched fields.
OPTIONS -f filename
--file filename
The file to parse. The default is /var/lib/dpkg/status.
-d [#]
--debug [#]
Each time this is specified, it increased the debug level.
-s field(s)
--sort field(s)
A space or comma separated list of fields to sort on.
-n field(s)
--numeric field(s)
A space or comma separated list of fields that should be interpreted as numeric in value.
-rs ??
--rec_sep ??
Output this string at the end of each output paragraph.
-h
--help Display some help.
fieldname
The fields from the file, that are matched with the regex given. The fieldnames are case insensitive.
out_fieldname
The fields from the file, that are output for each record. If the first field listed begins with ^, then the list of fields that
follows will NOT be output.
BUGS
Be warned that the author has only a shallow understanding of the dpkg packaging system, so there are probably tons of bugs in this pro-
gram.
This program comes with no warranties. If running this program causes fire and brimstone to rain down upon the earth, you will be on your
own.
This program accesses the dpkg database directly in places, querying for data that cannot be gotten via dpkg.
AUTHOR
Adam Heath <doogie@debian.org>
DEBIAN Debian Utilities DPKG-AWK(1)