|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Shell script compatibility in OS X
I am trying to run a program that was designed for Linux/Unix on MacOS X. I got it compiled and installed with no problems. This program needs Tcl and I have 8.4.2. But there is a shell script ( guess that is what it is, 1st line is #!/usr/local/bin --) that it runs that has serious compatibility problems. I've tried three different shells to no avail. I am not a programmer but I have found I needed to convert stuff like this:
set password_file $env(HOME)/.cloginrc to this: set password_file ${env::HOME}/.cloginrc For loops are choking: for {set i 0} {$i < $argc} won't work because though {set i 0} is a valid expression (I can type it at command line) the for statement chokes on it. Can anyone tell me why there might be such compatibility problems? I've tries tcsh, bash, and bourne. I thought shell scripts were more portable. What kind of documentation would allow me to hope to fix this? Thanks. Mark |
|
#2
|
|||
|
|||
|
I don't know much about UNIX yet but what I do know is that the OS X Terminal uses tcsh by default.
Hopefully someone else can help with the rest. |
|
#3
|
|||
|
|||
|
Re: Shell script compatibility - solved
I finally realized that it wasn't a shell script I was trying to run but a script for the program expect. I modified the 1st line of the script to indicate this (the instructions assumed more knowledge than I had in UNIX) and the program runs fine. So there are no shell or OS compatibility issues after all.
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Shell script compatibility in OS X |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|