08-23-2012
The getopts you describe is useful for shell scripts. If you want perl solution, you need to read perl documents.
10 More Discussions You Might Find Interesting
1. Programming
hey peeps
i need to allow a user to input a line and then my job is to separate that line into tokens and print out what each command is. my question here is, if eg: 'ls > aifle' is entered as the input line, you would separate it and get three tokens: token 1 would be 'ls', token 2 '>' and... (0 Replies)
Discussion started by: mile1982
0 Replies
2. UNIX for Dummies Questions & Answers
hai friend,
I am new to linux... I have to develop C program using unix command and i know the SYSTEM command.. But i need other then SYSTEM comand, plz send me the sample code....
Thank you..
sundar (1 Reply)
Discussion started by: sundar.lsr
1 Replies
3. Shell Programming and Scripting
I would like to capture output from two commands to a test file on the same line...
I want to get a file with all Applications and the Version of it...here are the two commands I use to get the output.
To get Application list I use
ls -1 /Applications/ |grep .app >>... (3 Replies)
Discussion started by: elbombillo
3 Replies
4. Shell Programming and Scripting
Hi Guys,
If want to change the string "09-06-11" to "11062009", i can only think use split to get the array@, the ,,, then restructure the sequence.
Is there a simple line to do that? :o
Thanks
-----Post Update-----
@file_e_tmp = split('-', $ARGV);
$file_date_e =... (6 Replies)
Discussion started by: jimmy_y
6 Replies
5. UNIX for Dummies Questions & Answers
Hi,
How would one send an email from the command line. Just a simple email. I used mailx -s "test" address@server.domain then hit enter.
Nothing happens then, I hit Ctrl + C twice, then I can start a new command again.
Any help? Tips? I did read up on this, but the examples is much more... (2 Replies)
Discussion started by: McGuywer
2 Replies
6. Shell Programming and Scripting
input1
a_a a/a 10 100
a1 a_a 20 200
b1 b_b 30 300
input2
a_a a/a xxx yyy
a1 a1 lll ppp
b1 b_b kkk ooo
output
a_a a/a 10 100 xxx yyy (2 Replies)
Discussion started by: ruby_sgp
2 Replies
7. Infrastructure Monitoring
Hi:
I use the snmpget command everyday. And Im getting tire of writing the same line evertime I have to verify something.
Example of the line:
snmpget -c DreamTeam dal2-hr2 ifAlias.227
The .227 its the circuit interface and also its variable; could be any other number depending on the... (13 Replies)
Discussion started by: javygonx
13 Replies
8. Shell Programming and Scripting
I have a really basic expect script which I call from php. I works fine when I run the php from the shell, but from the web it appears as if the output buffer gets chopped and never gets all of the contents.
php script: (runexpect.php)
<?php... (7 Replies)
Discussion started by: jacksona2
7 Replies
9. UNIX for Dummies Questions & Answers
Hello
I'm searching some kind of example (or ready-made solution, but I don't really want it, because I want to learn awk more), to make something like a parser in awk for something like this (I put example, because I don't really know how to explain this):
line1=1
line2=0
line3=1... (23 Replies)
Discussion started by: jormung
23 Replies
10. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies