Solved

Script with messages Cannot open -n

Posted on 2011-09-16
4
673 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
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 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…
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.
Suggested Courses

623 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