Re: Command line argument constraint (while editing) (216 Views)
Reply
Occasional Contributor
Rajin43
Posts: 10
Registered: ‎08-07-2012
Message 1 of 6 (244 Views)

Command line argument constraint

[ Edited ]

Hi All,

 

I am just trying to execute a long command in HP-UX where i could get it.

 

it is being ended with < symbol at the last and i could not edit further

 

Can you help to understand why i am getting like this. (Note : this is happening only in sh shell, in bash shell i am able to run the command without any issues)

 

Regards

Rajini

 

 

P.S. this thread has been moved from Servers > General to HP-UX > languages. - Hp Forum moderator

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,898
Registered: ‎03-06-2006
Message 2 of 6 (236 Views)

Re: Command line argument constraint (while editing)

[ Edited ]

While you can have a command line at least 1 MB long, in a real shell you can only edit commands less than 256 bytes.

So all long command lines should be put into a script.

(Or you need to type them without mistakes.  :-)

Please use plain text.
Occasional Contributor
Rajin43
Posts: 10
Registered: ‎08-07-2012
Message 3 of 6 (216 Views)

Re: Command line argument constraint (while editing)

Hi Dennis,

 

But the same command can be executed using the bash shell in HP-UX.is there any limitations in the shell or do we need to change any settings to run a long command in HP-UX?

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,898
Registered: ‎03-06-2006
Message 4 of 6 (213 Views)

Re: Command line argument constraint (while editing)

>the same command can be executed using the bash shell in HP-UX.

 

(I assume you meant edited.)  The shells are different.  Same as vi and vim.

 

>is there any limitations in the shell

 

Yes, this is one of them.

Please use plain text.
Occasional Contributor
Rajin43
Posts: 10
Registered: ‎08-07-2012
Message 5 of 6 (206 Views)

Re: Command line argument constraint (while editing)

Hi,

 

Is there any way to rectify it?

 

Rajini

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,898
Registered: ‎03-06-2006
Message 6 of 6 (203 Views)

Re: Command line argument constraint (while editing)

>Is there any way to rectify it?

 

You're not going to get a different answer.

You could put long strings into variables and use those to shorten the lines.

 

Again, as long as you don't edit the line, you can type as long as you want.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation