02-01-2013
Could you give input/output examples?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
What's the command to sort a file in ascending order and redirect the output to another file?
Thanks!!!!!! (1 Reply)
Discussion started by: gyik
1 Replies
2. UNIX for Dummies Questions & Answers
Hi all,
I want to sort a file based on the number in the 9th column
I've tried both of the following commands
sort -k 9,9n file_to_sort.dat
sort +8 -n file_to_sort.dat
both resulting in the same output which does sort col 9 nummerically
but it doesn't output the lines in the original... (2 Replies)
Discussion started by: olga
2 Replies
3. UNIX for Dummies Questions & Answers
hi,
i want to rename all the file names in order so that they can be sorted later.
For example, my filenames are like path\1, path\2...path\10, path\11.
But when I sort them, it sorts by the first number, so path\1 gets sorted with path\10.
I'm guessing the best way to do this is to rename... (5 Replies)
Discussion started by: gammaman
5 Replies
4. Shell Programming and Scripting
I am converting mainframes JCL to be used in shell on a one to one basis... when i use the sort command unix does ascii sort as a result which numbers are first followed by charecters in the Ascending sort ... but themainframes uses the EBCDIC as result gives the charecters followed by numbers in... (5 Replies)
Discussion started by: bourne
5 Replies
5. Shell Programming and Scripting
hai, how can i sort a file alphabetically without using sort command (6 Replies)
Discussion started by: rahul801
6 Replies
6. UNIX for Dummies Questions & Answers
I need to sort the particular column only in reverse order how i can give it..
if i give the -r option the whole file is getting sorted in reverse order.
1st 2nd col 3rd
C col 4th col 5th col
-------------------------------------------
C... (7 Replies)
Discussion started by: sivakumar.rj
7 Replies
7. Shell Programming and Scripting
Hi!
simple 'sort' produces a different output on SUN OS than on HP.
Lines with empty fields inside the key are sorted at the beginning on SUN; on HP they are at the end.
i.e
SUN
03|ref|168126310|702578641||||||||||||||
03|ref|168126310|702578641|DEL|
03|ref|168126310|702578641|FW|... (5 Replies)
Discussion started by: strolchFX
5 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I need to sort it by column or need it in a specific order...
input is
=====
uid=shashi country= india region =0 ph=0
uid= jon region= asia ph= 12345 country=0
uid = man country= india ph=2222 region=0
uid= neera region= asia ph= 125 country=0
output should be
uid=shashi ... (1 Reply)
Discussion started by: hegdeshashi
1 Replies
9. Shell Programming and Scripting
Hi
I am using this
cat substitutionFeats.txt | gawk '{$0=gensub(/\t/,"blabla",1);print}' | gawk '{print length, $0}' | sort -n | sort -r
and the "sort -n" command doesn't work as expected: it leads to a wrong ordering:
64 Adjustable cuffs
64 Abrasion-
64 Abrasion pas
647 Sanitized 647... (4 Replies)
Discussion started by: louisJ
4 Replies
10. UNIX for Beginners Questions & Answers
I am trying to sort a log file in chronological order to identify which ones did not process and still have an old (probably yesterday's) date. This is a sample of the file:flatf 010140 flatf Thu May 10 22:22:11 CST 2018 flats finished
flatf 010142 flatf Thu May 10 22:31:25 CST 2018 flats... (4 Replies)
Discussion started by: wbport
4 Replies
LEARN ABOUT DEBIAN
dose-ceve
CEVE(1) DOSE Tools CEVE(1)
NAME
dose-ceve - parse package metadata
SYNOPSIS
dose-ceve [-h] [-v] [-e pkgspec] [-c pkgspec] [-r pkgspec] [--depth=n] [-t format] [-o filename] input-spec
DESCRIPTION
Dose-ceve is a generalized metadata parser. It reads package specifications, extracts package metadata from them, performs some
manipulations, and outputs the package metadata in one of several formats.
OPTIONS
-h This option displays the help message. Can also be specified as --help.
-v Be verbose. This option can be repeated for more verbosity.
-e pkgspec
(Option Not Implemented Yet) Extract the transitive closure of packages connected (by conflict or dependency) to any of the packages
that satisfy pkgspec. Such a package specification is a list of packages (separated by a semicolon), where each package is specified as
follows: (name,version). This option can also be specified as --extract=pkgspec.
-c pkgspec
Similar to the -c option, but only uses the dependency relation to make the transitive closure. This option can also be specified as
--cone=pkgspec.
-r pkgspec
Similar to the -e and -c options, but uses the reverse dependency relation to make the transitive closure. This option can also be
specified as --rcone=pkgspec.
--depth=n
In combination with the -e, -c or -r options, this specifies the maximum depth for the transitive closure. =item -t format
Specifies the output format to use. Possible values are dot for a graph output in Dot/GraphViz format, cnf for an output in CNF format,
dimacs for an output in the DIMACS format for CNF formulae, and cudf for a pretty-print output in an RFC 822-like format. This option
can also be specified as --outtype=format.
-o filename
Instead of stdout, send output to the file filename. This option can also be specified as --outfile=filename. =item input-spec
This is a URL specifying both the input format and the file to get the input from. Possible schemes are: =item *
cudf for cudf files =item *
deb for Debian package files (possibly compressed with gzip(1) or bzip2(1), depending on compile-time options for dose3) =item *
debstdin for Debian package files read from standard input =item *
eclipse for Eclipse (p2) package files =item *
pgsql for PostgreSQL databasess =item *
sqlite for sqlite databases
* hdlist for RPM hdlists =item *
synth for urpmi synthesis hdlists
Some examples of URLs:
* deb://Packages.gz (the Debian file packages.gz in the current directory)
* cudf:///home/examples/cudf/test.cudf (the CUDF file /home/examples/cudf/test.cudf)
* psql://user@db.mancoosi.org:723/packages (the database packages on host db.mancoosi.org on port 723, accessed as user user)
dose3 3.0.2 2012-10-03 CEVE(1)