The best way to do this is to not do this. As you have seen, optional option arguments lead to ambiguous command lines. The only time you can reliably parse them is if they are the last option on the command line and there are no operands.
In VERY specific cases, you can look at an option argument and know that it is an invalid option argument (and in that case use the default), but a typo on a command line in that case can lead to unexpected (and frequently hard to debug) behavior.
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
I am getting out of memory issue in perl. I need to debug which function taking more memory constraints. what the commands to find out the memory consuming in the perl program. (1 Reply)
Dear all,
I want to execute fsck command,can i execute fsck command without any option
asking for more confidence.
Thanks and Regards
Monoj Das (1 Reply)
I am just learning shell scripting and already I found out I have the bad habit of thinking that it is similar to php or c.
I learned some basics and now encountered this problem:
On shell it is possible to type:
$ date --date="2009-10-10 09:08:34"
Sat Oct 10 09:08:34 CEST 2009
... (2 Replies)
could someone show me a sample command line option driven script?
i want to see an easy way to write one and how i can execute it using command line options such as typing in
read.pl -i <id> -c <cmds> -s <start> -e <end>
would read out all the commands run by ID . from start time to... (7 Replies)
Hi,
what is the meaning of -n option before the grep command ?
grep command searches for the specified string in the file tmp_crontab.txt
but what does -n mean ?
With Regards (1 Reply)
Running HP 11.31 on a HP3600. But when I log in as a user the who command works but if I use an option like "who -m" I get nothing. Any thoughts on what is causing this problem. (11 Replies)
I have a perl script which runs and send out e-mail if duplicates are found.
I would like to run the with option (like -e) so that it will produce the out put only and will not send out e-mail.
How can I achieve it. I would appreciate the help.
Thanks.
Example: ./file1 (sends out e-mail)... (5 Replies)
How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm?
In older versions of Unix, this used to work, but not in Sun Solaris.
Thanks (4 Replies)
i'm using SunOS 5.7 and I know theres a ls option for seeing what kind of files are in a directory. I was wondering if there was a ls option that could see if the files are txt or files that can be opened in vi (1 Reply)