BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old May 15th, 2003, 10:37 PM
mduling mduling is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: L.A.
Posts: 2 mduling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old June 2nd, 2003, 06:41 PM
macskeeball macskeeball is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 65 macskeeball User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 24 m 13 sec
Reputation Power: 6
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.

Reply With Quote
  #3  
Old June 5th, 2003, 11:39 PM
mduling mduling is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: L.A.
Posts: 2 mduling User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Shell script compatibility in OS X


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway