Build script for all shells


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Build script for all shells
# 8  
Old 04-13-2005
Quote:
Originally Posted by vino
My first line in the script (after the #! /bin/sh and following # lines ) were,
this is a shell script that uses the normal "#!" directive and that the user is running by calling "sh scriptname" ... if the OP has a particular requirement to set SHELL, which is an environmental variable, then the code is to check $SHELL is required ... however, the "#!" directive has already set the script's run shell as "/bin/sh" so the run shell --- whether SHELL is reset to a different shell or not --- is technically "/bin/sh" ...

Last edited by Just Ice; 04-13-2005 at 03:20 PM.. Reason: clarification
# 9  
Old 04-13-2005
True enough. Should have caught that. That magic number should be removed. In all fairness, I agree with your statement earlier - that is - pick a shell and go with it. I dont think trying to write a generic shell script to run under all shells is worth the effort (just my opinion)
# 10  
Old 04-14-2005
google, thanks for the links.

And thanks to all for the opinions. I guess I will have to stick to one SHELL and build !

Vino
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX shells script to echo out the date value

I appreciate if someone answer this question for my learning purpose: Given a filename structure of a COUNTRY CODE, file type, date (YYYYMMDD) and two digit attempt number with an extension of ".dat", write a UNIX shells script to echo out the date value. Example: ... (1 Reply)
Discussion started by: shumail
1 Replies

2. Shell Programming and Scripting

Build.xml invocation by Build Script

Hi I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies

3. UNIX for Dummies Questions & Answers

Too Many Arguments Error - shells script

Hi, I am getting the below error : error at the if condition start and when I print the value of TEST, it displays two values as below /home/xyz/out/file1.txt /home/xyz/out/file2.txt if ; then mv $TEST $TARGETDIR/ fi Tried by enclosing it in double quotes "$TEST",... (4 Replies)
Discussion started by: sudhagk
4 Replies

4. Shell Programming and Scripting

Run commands in a script in different shells

Hi to all, i have the following problem... i want to run three commands in a script in different shells... the first command is running always and is needed for the second on to run properly... example # Procedure 1 xterm -e exec1 arg1 arg2 # Procedure 2 xterm -e exec2 arg1 arg2 #... (6 Replies)
Discussion started by: paladinaeon
6 Replies

5. Shell Programming and Scripting

Calling a function which uses expect from a shells script

Hi all, This is the first time i am using expect. I am trying to call a function with in the shell script. The function will shh to a new server and will pass the password using expect and send. I need help in calling the fuction i am getting follaowing errors... here the script ... (8 Replies)
Discussion started by: firestar
8 Replies

6. Shell Programming and Scripting

Oracle environmental variables in shells script

Hi, Getting below error on executing the shell script which initiates sqlplus How to set oracle enviornment variables in the shell script ? With Regards (3 Replies)
Discussion started by: milink
3 Replies

7. Shell Programming and Scripting

Question regarding shells and subshells when a script is run

I have the following script running with nohup on one of my servers: #!/bin/bash #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #set log number #i=1 #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ #Check if log exits, if so incrememnt log number up so we don't clobber #while... (8 Replies)
Discussion started by: DeCoTwc
8 Replies

8. Shell Programming and Scripting

Rename a lot of files using shells script

Hi This is the list file that i have : The files is more than this. I will rename one by one file become like this : So just change the time stamp 200906 become 200905. Is it possible using script ? Thanks (3 Replies)
Discussion started by: justbow
3 Replies

9. Shell Programming and Scripting

Using different shells in one script

Hi, Is it possible to use multiple shells in one script. There are sometimes we need to club shell specific commands in single script. for example in bash mode we use -e with echo to use Escape sequence but in ksh it is not required. How to tell a UNIX command to run in a specific shell. ... (2 Replies)
Discussion started by: sanjay1979
2 Replies

10. Shell Programming and Scripting

Validating variables in shells script

All Can you help me to validate a variable only for string and digit. That is variable should either fully alphabets or digits. Please send me result to my mail id also: REMOVED Thanx in advance Regards Deepak Xavier (1 Reply)
Discussion started by: DeepakXavier
1 Replies
Login or Register to Ask a Question