The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executable files nervous UNIX for Dummies Questions & Answers 9 10-30-2007 12:44 AM
Finding executable files in all directories CSGUY UNIX for Dummies Questions & Answers 4 04-19-2005 03:34 PM
Converting Unix executable files Steven Greenber OS X (Apple) 4 02-04-2005 08:58 AM
Cannot translate Unix executable files Steven Greenber OS X (Apple) 1 02-11-2004 11:14 AM
Making files readonly with vi? Flyguy UNIX for Dummies Questions & Answers 2 11-15-2003 02:52 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-28-2002
ropers
Guest
 

Posts: n/a
pls hlp: making .sh files executable

I've got a file named jdictd.sh containing the following:

--- begin file contents ---
#! /bin/csh
echo I\'m running!
java -cp jdictd.jar org.dict.server.JDictd data/dict.ini
# Use the following line instead if JRE 1.1 is used
# jre -cp jdictd.jar org.dict.server.JDictd data/dict.ini
---end file contents ---

The attributes are set as follows:
-rwxrwxrwx 1 ropers staff 198 Jul 28 22:02 jdictd.sh

I am trying to just execute the file by typing:

jdictd.sh

at the tcsh prompt and it doesn't work.
If I type:

tcsh jdictd.sh

it does work however.
Any ideas?

- tried this w/ both tcsh and bash
- running FreeBSD/Mach/Darwin/MacOSX on G3 PPC
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-29-2002
Registered User
 

Join Date: Feb 2002
Location: Bradford, UK
Posts: 70
What message do you get when the script doesn't work?

If it's 'jdictd.sh not found' it's probably down to the directory your in not being part of the paths defined in your profile.

You can execute it by typing . ./jdictd.sh , or add the directory to your profile or move jdictd.sh to a directory in your profile.

The reason it works when you type tcsh jdictd.sh is because you are starting a new shell to run jdictd.sh & this shell then looks in the directory you are in to find jdictd.sh
Reply With Quote
  #3 (permalink)  
Old 07-29-2002
ropers
Guest
 

Posts: n/a
thanks

thanks - that worked :-)
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0