Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Command line argument constraint

Highlighted
Rajin43
Occasional Contributor

Command line argument constraint

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

5 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Command line argument constraint (while editing)

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.  :-)

Rajin43
Occasional Contributor

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?

Dennis Handly
Acclaimed Contributor

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.

Rajin43
Occasional Contributor

Re: Command line argument constraint (while editing)

Hi,

 

Is there any way to rectify it?

 

Rajini

Dennis Handly
Acclaimed Contributor

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.