LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2023, 07:31 PM   #16
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,686

Rep: Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692Reputation: 1692

Maybe I'm misinterpreting the question but my take is that there is some existing program called "compressor". It expects arguments as follows:
Code:
% compressor --help
USAGE: compressor <compression level> <inputfiles> <outputfile>
And OP wants a wrapper script, such as:
Code:
% compressor.sh --help
USAGE: compressor.sh <inputfiles> <outputfile> <compression level>
My post was an example of compressor.sh

Evo2.
 
Old 02-24-2023, 07:39 PM   #17
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,133

Rep: Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341Reputation: 5341
Ok, so we all have the same understanding.
 
Old 02-25-2023, 01:24 AM   #18
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 19,880

Rep: Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734Reputation: 6734
Quote:
Originally Posted by astrogeek View Post
I have stayed out of this discussion waiting for someone to ask what that reason actually is, so this looks like a good point to ask it myself...

@OP: What, exactly, are you trying to accomplish by reordering those args? Please describe the intended use, including a description of the problem to be solved and how you think this will solve it.
I don't think there is a problem here. It is only about the order of the arguments. I think OP just wanted a different order, which is much more convenient for him/her. I totally agree with it, there is no logic behind that, so (in general) the expected order of the arguments (in most cases) are just strange, unusual. But actually this is how it was implemented. And you always have the possibility to add a wrapper to it.
I know we have conventions, we have similar programs, just that won't make it more convenient.
 
  


Reply

Tags
bourne, scripting, scripts, variables


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] shell script to reorder kernel module order when booting.- need help in writing a scr deepclutch Programming 6 08-26-2014 05:14 AM
[SOLVED] script to reorder data in a row rebelbuttmunch Programming 19 05-01-2014 11:36 AM
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
reorder partition lables Rojahon Linux - Hardware 2 07-09-2005 06:29 PM
Simple sh script: rand reorder Sinope Programming 2 09-11-2004 05:24 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration