Cerf
01-16-2005, 10:41 PM
Hey,
I was just wondering if someone could refer me to some literature on how to decode switches. For example, "ls -la". "l" and "a" are the switches. What makes it complicated is the many combinations it could be in.
ls -l -a
ls -a -l
ls -la
ls -al
The number of combinations is P(3, 3) = 3! = 3 x 2 x 1.
Now I'm sure that in a simple case like this everything could me accomplished in a nice loop, but what about a command such as tar where there is the switchs and strings in the command line
So to get back to my origional point, does anyone know where I can get a HOWTO on this or any related lituratre?
I was just wondering if someone could refer me to some literature on how to decode switches. For example, "ls -la". "l" and "a" are the switches. What makes it complicated is the many combinations it could be in.
ls -l -a
ls -a -l
ls -la
ls -al
The number of combinations is P(3, 3) = 3! = 3 x 2 x 1.
Now I'm sure that in a simple case like this everything could me accomplished in a nice loop, but what about a command such as tar where there is the switchs and strings in the command line
So to get back to my origional point, does anyone know where I can get a HOWTO on this or any related lituratre?