![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| passing variable from bash to perl from bash script | arsidh | Shell Programming and Scripting | 10 | 06-04-2008 12:25 PM |
| Why generate "ash and bash" different output for same bash script? | s. murat | Shell Programming and Scripting | 0 | 05-26-2008 07:19 AM |
| Problem in running bash shell commands on HP-UX machine | abhishek0071 | UNIX for Advanced & Expert Users | 6 | 02-15-2008 03:30 PM |
| how to make a bash script that can be executed by people simultaneously? | jimmbp | Shell Programming and Scripting | 4 | 01-31-2006 01:15 PM |
| How to make bash script abort? | siegfried | Shell Programming and Scripting | 1 | 11-23-2005 12:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
how to make your bash script run on a machine with csh and bash
hi,
i have a script that runs on bash and would like to run it on a machine that has csh and bash. the default setting on that machine is csh. i dont want to change my code to run it with a csh shell. is there any way i can run the script (written in bash) on this machine? in other words is there any statement i can put in my script that will change the script on the host machine from csh to bash? |
|
||||
|
ok this is an old machine..here are first few lines from the script:
Code:
#!/sbin/sh
start_time=`date +%s`
binarray=(20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20)
awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io
awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1
awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2
count=0
exec 10<io
while read LINE <&10; do
ARRAY[$count]=$LINE
((count++))
done
when i run it,it complains about the binarray statement and also says command 10: not found.. |
|
||||
|
Have you tried to replace the shebang?
Regards |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|