bash questions

bash questions

Post by Umesh Bell » Thu, 05 May 1994 09:04:57



I have several old csh scripts which I want to run with bash. Is there
a clean way of doing this? Conversion programs etc etc. If not, how
does one do the foll: in bash?

1. Equivalent of switch(...) case....... endsw

2. Match wildcards like :
                if test "$C" = "4.*" ; then.....
I want to match all 4.strings with $C.


--
Umesh Bellur
Teknekron Communication Systems

 
 
 

bash questions

Post by Chet Ram » Thu, 05 May 1994 23:28:37




>I have several old csh scripts which I want to run with bash. Is there
>a clean way of doing this? Conversion programs etc etc. If not, how
>does one do the foll: in bash?

>1. Equivalent of switch(...) case....... endsw

case "..." in
...)    xxx ;;
esac

Quote:>2. Match wildcards like :
>            if test "$C" = "4.*" ; then.....
>I want to match all 4.strings with $C.

I'm not sure if this does exactly what you want, but some variation
should:

case "$C" in
4.*)    xxx ;;
esac
--
"You can watch an actor absolutely sabotage a good script and then read
 reviews like 'Unfortunately, even the impressive talents of Cheech Marin
 could not salvage Anton Chekhov's trite and meandering script.'"


 
 
 

1. Another bash question

Hi,

having just started to use bash, I confess to still being a bit
confused about ~/.bash_profile , ~/.bash_login , ~/.profile
and ~/.bashrc ....

Can anyone see any serious objections to using say, ~/.profile
for EVERYTHING (env. variables, aliases and so on).

I use a network of SUNs, and intend to run lots of scripts, etc.

Being a simpleton, I simply like to keep things as simple as possible.

Thanks in advance,

Geoff Rubner,
UMIST, Manchester, UK.

2. Talk trouble !!!

3. simple bash question

4. Help: Boot failure w/ SCSI-2 motherboard!

5. sh/bash question

6. Printer on-line ?

7. bash question?

8. System accounting

9. Bash Question

10. bash question

11. bash question: how to redirect "Segmentation fault" reports ?

12. Bash question

13. stupid sh/bash question