10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Have a text file containing 4 columns, the 4th column is sorted numerically in descending order. The 2nd column is alpha text. Been able to get the 4th column to sort in descending order. The 2nd column sorts correctly but it's also in reverse. Would like to be able to keep the 4th column sort... (8 Replies)
Discussion started by: jimmyf
8 Replies
2. UNIX for Dummies Questions & Answers
I have a file like this:
/vol/eng_app_0103z
/vol/eng_app_0103z
/vol/eng_app_0120z
/vol/eng_app_0126z
/vol/eng_app_0144z
/vol/eng_app_0150z
/vol/eng_app_0154z
/vol/eng_app_01551z
/vol/eng_app_01552z
/vol/eng_app_0155z
/vol/eng_app_0164z
/vol/eng_app_0199zWhen I use the sort command... (3 Replies)
Discussion started by: newbie2010
3 Replies
3. Shell Programming and Scripting
Hi Guys,
I have a file to be sorted and uniq with the following format.
S00001002|01|20021231
S00001002|01|20011031
S00001006|01|20120430
S00001006|01|20111231
S00001006|01|20111031
S00001006|01|20110831
S00001006|01|20110731
S00001006|01|20101231
S00001006|01|20091231... (5 Replies)
Discussion started by: nua7
5 Replies
4. UNIX for Dummies Questions & Answers
I am going through the Unix Made Easy second edition book by John Muster. So far it's been very informative and I can tell it may be a bit out of date.
In one of the exercises it talks about the "sort" command and using it to sort column's of data etc. The "sort" command has changed a bit and... (1 Reply)
Discussion started by: budfoxcat
1 Replies
5. Shell Programming and Scripting
Hello Everybody :) !!!. i have question in mind, is it possible to sort a list of hexadecimal numbers using "sort" command? (9 Replies)
Discussion started by: Kesavan
9 Replies
6. Shell Programming and Scripting
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
Discussion started by: daniel.gbaena
7 Replies
7. Shell Programming and Scripting
Hi all.
HPUX - posix shell - script question
Here's my data:
f1 f2 f3 f4 f5 f6
|02/12/09|12:33PM|3|Oceanview |OVT #1| VISA/MC
|02/12/09|12:14PM|3|Oceanview |OVT #1| VISA/MC
|02/12/09|09:13AM|4|Oceanview |OVT #1| VISA/MC ... (8 Replies)
Discussion started by: lyoncc
8 Replies
8. Shell Programming and Scripting
Hi all.
Is there a way that I can use the sort command too sort the following field by earliest time (12:00AM) to latest time (11:59PM)?
07:12PM
07:53PM
07:54PM
08:07PM
10:15AM
10:21AM
TIA!!!!!! (1 Reply)
Discussion started by: lyoncc
1 Replies
9. UNIX for Dummies Questions & Answers
I'm looking for a sort command that will sort by zip code first then by last name. (zip code is the last field, last name is first field)
data file looks like this.
Hope Bob 1234 Main ST. Colorado Springs, CO 80920
I was thinking along the lines of:
sort -k9n address.data //for the... (2 Replies)
Discussion started by: ssgatbliss
2 Replies
10. UNIX for Dummies Questions & Answers
M 47 HIS:LOT 32 DUTY 2 MIKE, FINISHED
MIKE ACTIVE STATUS
23TASK YES GOOD
100TASK NO GOOD
========================================
M 47 HIS:LOT 1 DUTY 1 MIKE, FINISHED
MIKE ACTIVE STATUS
23TASK YES GOOD
... (7 Replies)
Discussion started by: bobo
7 Replies
HLS(1) General Commands Manual HLS(1)
NAME
hls - list files in an HFS directory
SYNOPSIS
hls [options] [hfs-path ...]
DESCRIPTION
hls lists files and directories contained in an HFS volume. If one or more arguments are given, each specified file or directory is shown;
otherwise, the contents of the current working directory are shown.
OPTIONS
-1 Output is formatted such that each entry appears on a single line. This is the default when stdout is not a terminal.
-a All files and directories are shown, including "invisible" files, as would be perceived by the Macintosh Finder. Normally invisible
files are omitted from directory listings.
-b Special characters are displayed in an escaped backslash notation. Normally special or non-printable characters in filenames are
replaced by a question mark (?).
-c Sort and display entries by their creation date, rather than their modification date.
-d List directory entries themselves rather than their contents. Normally the contents are shown for named directories on the command-
line.
-f Do not sort directory contents; list them in the order they appear in the directory. This option effectively enables -a and -U and
disables -l, -s, and -t.
-i Show the catalog IDs for each entry. Every file and directory on an HFS volume has a unique catalog ID.
-l Display entries in long format. This format shows the entry type ("d" for directory or "f" for file), flags ("i" for invisible),
file type and creator (four-character strings for files only), size (number of directory sub-contents or file resource and data
bytes, respectively), date of last modification (or creation, with -c flag), and pathname. Macintosh "locked" files are indicated by
"F" in place of "f".
-m Display entries in a continuous format separated by commas.
-q Replace special and non-printable characters in displayed filenames with question marks (?). This is the default when stdout is con-
nected to a terminal.
-r Sort entries in reverse order before displaying.
-s Show the file size for each entry in 1K block units. The size includes blocks used for both data and resource forks.
-t Sort and display entries by time. Normally files will be sorted by name. This option uses the last modification date to sort unless
-c is also specified.
-x Display entries in column format like -C, but sorted horizontally into rows rather than columns.
-w width
Format output lines suitable for display in the given width. Normally the width will be determined from your terminal, from the
environment variable COLUMNS, or from a default value of 80.
-C Display entries in column format with entries sorted vertically. This is the default output format when stdout is connected to a
terminal.
-F Cause certain output filenames to be followed by a single-character flag indicating the nature of the entry; directories are fol-
lowed by a colon (:) and executable Macintosh applications are followed by an asterisk (*).
-N Cause all filenames to be output verbatim without any escaping or question-mark substitution.
-Q Cause all filenames to be enclosed within double-quotes (") and special/non-printable characters to be properly escaped.
-R For each directory that is encountered in a listing, recursively descend into and display its contents.
-S Sort and display entries by size. For files, the combined resource and data lengths are used to compute a file's size.
-U Do not sort directory contents; list them in the order they appear in the directory. On HFS volumes, this is usually an alphabetical
case-insensitive ordering, although there are some idiosyncrasies to the Macintosh implementation of ordering. This option does not
affect -a, -l, or -s.
SEE ALSO
hfsutils(1), hcd(1), hpwd(1), hdir(1), hcopy(1)
FILES
$HOME/.hcwd
AUTHOR
Robert Leslie <rob@mars.org>
HFSUTILS
14-Jan-1997 HLS(1)