Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Bash Question

Name: Anonymous 2006-04-21 16:25

I'm trying to do a somewhat of a variable substitution operation.
I need to calculate the second to last variabe in the script. This is done by various ways most involving "$# - 2", now my question is how do I make the output of such operations to calculate "$# - 2" as a suffix to $ to be taken as a variable?

Name: Anonymous 2006-04-21 16:36

Use Ruby.

Name: Anonymous 2006-04-21 18:06

>>2

He asked about bash.

Name: Anonymous 2006-04-21 18:14

Not everything can be done in bash.

Name: Anonymous 2006-04-21 18:51

>>1
>>I need to calculate the second to last variabe in the script.
Variables are ordered? I thought they had "names."

Name: Anonymous 2006-04-21 20:19

>>1
Use PHP (CLI SAPI), it's great for that kind of thing, portable, quicker than Ruby or Python and nicer than Perl.

Name: Anonymous 2006-04-21 23:00

>>5
He means runtime parameters in bash they're $1 $2 $3 ...

Name: Anonymous 2006-04-22 8:38

>>6
PHP quicker than Ruby or Python (or any language)? I don't think so.

Name: Anonymous 2006-04-23 2:06

Can I enlarge my penis using bash?

Name: Anonymous 2006-04-23 4:07

Sure. Lay your dick down on a desk and bash it with a hammer. You won't be able to get it up anymore, but the girls will be amazed by your newly inflamed bleeding dick.

Bonus points: it's about as enjoyable as programming in bash as well. And more productive!

Name: Anonymous 2006-04-24 7:07

>>8
PHP seems to perfrom faster than Ruby, but by quicker I meant faster to get a short system script done on PHP than Ruby or Python.

Name: Anonymous 2011-02-03 5:19


Don't change these.
Name: Email:
Entire Thread Thread List