Solved

Script with messages Cannot open -n

Posted on 2011-09-16
4
645 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you all.

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

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now