I check the man page but I still cannot see what this command is supposed to do
sort +5 -6 <file>
It just seems to sort the file as normal??
Thanks
Calypso (3 Replies)
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)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
sort --random-sort
The full command is
path=`find /testdir -maxdepth 1 -mindepth 1 -type d | ***Some sort of sort function*** | head -1`
I have a list I want to randomly sort. It works fine in ubuntu but on a 'osx lion' sort dosen't have the --random-sort option.
I don't want to... (5 Replies)
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Hi,
Could anyone kindly show me a link or explain the difference between
sort -n -k2 -k3 & sort -n -k2,3
Also, if I like to remove the row with repetition at both $2 and $3, Can I safely use
sort -u -k2 -k3
Example;
100 20 30
100 20 30
So, both $2 and $3 are same and I... (2 Replies)
How to sort the following output based on lowest to highest BE?
The following sort does not work.
$ sort -t. -k1,1n -k2,2n bfd.txt
BE31.116 0s 0s DOWN DAMP
BE31.116 0s 0s DOWN DAMP
BE31.117 0s 0s ... (7 Replies)
Discussion started by: sand1234
7 Replies
LEARN ABOUT NETBSD
cal
CAL(1) BSD General Commands Manual CAL(1)NAME
cal -- displays a calendar
SYNOPSIS
cal [-3hjry] [-A after] [-B before] [-d day-of-week] [-R reform-spec] [[month] year]
DESCRIPTION
cal displays a simple calendar. If arguments are not specified, the current month is displayed. The options are as follows:
-3 Same as ``-A 1 -B 1''.
-A after
Display after months after the specified month.
-B before
Display before months before the specified month.
-d day-of-week
Specifies the day of the week on which the calendar should start. Valid values are 0 through 6, presenting Sunday through Saturday,
inclusively. The default output starts on Sundays.
-h Highlight the current day, if present in the displayed calendar. If output is to a terminal, then the appropriate terminal sequences
are used, otherwise overstriking is used. If more than one -h is used and output is to a terminal, the current date will be high-
lighted in inverse video instead of bold.
-j Display Julian dates (days one-based, numbered from January 1).
-R reform-spec
Selects an alternate Gregorian reform point from the default of September 3rd, 1752. The reform-spec can be selected by one of the
built-in names (see NOTES for a list) or by a date of the form YYYY/MM/DD. The date and month may be omitted, provided that what is
specified uniquely selects a given built-in reform point. If an exact date is specified, then that date is taken to be the first
missing date of the Gregorian Reform to be applied.
-r Display the month in which the Gregorian Reform adjustment was applied, if no other month or year information is given. If used in
conjunction with -y, then the entire year is displayed.
-y Display a calendar for the current year.
If no parameters are specified, the current month's calendar is displayed. A single parameter specifies the year and optionally the month in
ISO format: ``cal 2007-12'' Two parameters denote the month (1 - 12) and year. Note that the century must be included in the year.
A year starts on Jan 1.
NOTES
In the USA and Great Britain the Gregorian Reformation occurred in 1752. By this time, most countries had recognized the reformation
(although a few did not recognize it until the 1900's.) Eleven days following September 2, 1752 were eliminated by the reformation, so the
calendar for that month is a bit unusual.
In view of the chaotic way the Gregorian calendar was adopted throughout the world in the years between 1582 and 1928 make sure to take into
account the date of the Gregorian Reformation in your region if you are checking a calendar for a very old date.
cal has a decent built-in list of Gregorian Reform dates and the names of the countries where the reform was adopted:
Italy Oct. 5, 1582 Denmark Feb. 19, 1700
Spain Oct. 5, 1582 Great Britain Sep. 3, 1752
Portugal Oct. 5, 1582 Sweden Feb. 18, 1753
Poland Oct. 5, 1582 Finland Feb. 18, 1753
France Dec. 12, 1582 Japan Dec. 20, 1872
Luxembourg Dec. 22, 1582 China Nov. 7, 1911
Netherlands Dec. 22, 1582 Bulgaria Apr. 1, 1916
Bavaria Oct. 6, 1583 U.S.S.R. Feb. 1, 1918
Austria Jan. 7, 1584 Serbia Jan. 19, 1919
Switzerland Jan. 12, 1584 Romania Jan. 19, 1919
Hungary Oct. 22, 1587 Greece Mar. 10, 1924
Germany Feb. 19, 1700 Turkey Dec. 19, 1925
Norway Feb. 19, 1700 Egypt Sep. 18, 1928
The country known as Great Britain can also be referred to as England since that has less letters and no spaces in it. This is meant only as
a measure of expediency, not as a possible slight to anyone involved.
HISTORY
A cal command appeared in Version 6 AT&T UNIX.
BSD December 21, 2007 BSD