473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

UNIX Sort question

I am currently trying to modify some code of a previous employee and I cannot figure out what this sort command is doing.

sort -t'|' +0 -1 -n +5 -6 -n /tmp/o3 > /tmp/o4

I understand that the separator is | and the -n +5 would mean to sort field 6 numerically and also that it is sorting o3 and going into o4. what I dont understand is the +0 -1 at the beginning and the -6 -n at the end.
Dec 28 '07 #1
1 2021
think I get this now, but please correct me if I am wrong

sort -t'|' +0 -1 -n +5 -6 -n /tmp/o3 > /tmp/o4

I think this would mean to sort field 1, but if it is the same sort(numerically) based on field 5, if that is the same sort it numerically.

if I am way off, or a little off, please correct me as I am still trying to learn these commands.
Dec 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Kotlin Sam | last post by:
For a while at least I have to work in Windows rather than UNIX, which is more familiar. I'm trying to do with Python some of the things that I've done for years in shell, in particular, sort. The...
5
by: jrefactors | last post by:
when people say unix programmer, does it mean they write programs in unix environment,and those programs are run in unix platform? it is not necessary they are using unix function calls? I heard...
48
by: Daniel Rudy | last post by:
Hello, On a x86 machine, what is the format of a pointer in C? I know for a fact that the x86 p-mode uses a /selector:offset/ notation where the selector is defined in either the GDT or LDT. ...
22
by: markus | last post by:
Hi, There are more than 1000 defined system calls in the Unix standard specification, however, a majority of them are optional and the availability of system calls are dependent on the OS...
7
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
3
by: rrs.matrix | last post by:
hi is there any system call in unix that will search for a file in the filesystem. someting like the find utility. if not then how should i search for a file in the file system. heard of...
4
by: Michael | last post by:
Hi, I'm having difficulty finding any previous discussion on this -- I keep finding people either having problems calling os.exec(lepev), or with using python's exec statement. Neither of...
3
by: lovecreatesbeauty | last post by:
As the most basic algorithms, search and sort my be the most essential things in many software. Does your code have them (or one of them)? What functions in UNIX 6th Edition implement search and...
1
by: Karim | last post by:
Hi, I am working on a c++ project involving sockets and threads and I need to ask a pretty basic question. If you have a socket that every time it accepts a connection (accept()) it spawns a...
65
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.