The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Basic questions on writing a Unix Service (newbie help!) Rutland Gizz High Level Programming 3 12-06-2006 06:48 PM
Examples of writing shell scripts for AIX, it's urgent me_haroon AIX 4 06-21-2006 07:23 AM
writing scripts ebethea27703 Shell Programming and Scripting 4 05-18-2006 10:59 AM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 03:27 AM
Is writing shell scripts different than... brentdeback Shell Programming and Scripting 1 10-28-2005 10:20 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-25-2001
richgi richgi is offline
Registered User
  
 

Join Date: Apr 2001
Posts: 4
Hi, I have just started a Systems Programming course and am required to write a c shell script as part of it.

I have little to no clue about unix.

The spec states that the script can be run only once on each host by a user, but the script can be run on different hosts by the one user.

How would I go about determining whether the script is running on the host?? and how do I activate the script on a remote host, I tried rsh hostname scriptname, but got some type of protocol error, the script relies mainly on the who command.

all help appreciated...

Rich
  #2 (permalink)  
Old 04-25-2001
Charles Charles is offline
Registered User
  
 

Join Date: Apr 2001
Posts: 1
This post is slightly unclear. However, it is common to use rsh (ssh is prefered to execute commands on remote boxes) rsh -l <username> <host> <script>
rsh -l test bla.com /usr/src/bla.sh
  #3 (permalink)  
Old 04-27-2001
richgi richgi is offline
Registered User
  
 

Join Date: Apr 2001
Posts: 4
sorry about being unclear.

I have tracked the problem down to this:

in a shell script, what command will create an empty file?

how can I then test if this file exists and execute a statement conditionally?
i.e
if fileexists
statement

also additional questions:

how can I interrupt a background process without resorting to the process table and kill command?

how can I ensure the (infinitely running) shell script exits when I logout, for e.g if I had the script running as
a background process with output redirected to file, it will continue to run, I need to stop this from happening, and ensure that the same code that handles the interrupt is executed whenever I logout.

thanks very much for any help.

Rich



Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0