Solved

Script with messages Cannot open -n

Posted on 2011-09-16
4
657 Views
Last Modified: 2013-11-17
Hi experts.
I have the following question.

The following statement  gave the following "Cannot open" mesages in aix 5.3

sort -i /home/oracle/dba/lists/list+size -o /home/oracle/dba/lists/sortedlist -n -k 1,1

sort: 0653-655 Cannot open -n
sort: 0653-655 Cannot open -k
sort: 0653-655 Cannot open 1,1
0
Comment
Question by:LindaC
4 Comments
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 25 total points
ID: 36551497
Options need to come first.

sort -n -k1,1 -i /home/oracle/dba/lists/list+size -o /home/oracle/dba/lists/sortedlist
0
 
LVL 21

Assisted Solution

by:Papertrip
Papertrip earned 25 total points
ID: 36551498
sort -i -n -k 1,1 -o /home/oracle/dba/lists/sortedlist /home/oracle/dba/lists/list+size

Open in new window

0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 450 total points
ID: 36551510
Hi,

options must precede filenames.


sort -i -n -k1,1 /home/oracle/dba/lists/list+size -o /home/oracle/dba/lists/sortedlist

or

sort -i -k1,1n /home/oracle/dba/lists/list+size -o /home/oracle/dba/lists/sortedlist

wmp
0
 
LVL 8

Author Closing Comment

by:LindaC
ID: 36551533
Thank you all.

Awarding woolmilkporc as was the closest to the original and was succesfully executed.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question