Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Script with messages Cannot open -n

Posted on 2011-09-16
4
Medium Priority
?
683 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 100 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 100 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 1800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

876 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