Results 1 to 3 of 3
Im having problems using a bash script i can get the script to start up and run but im not sure what the commands are from looking at the source ...
- 12-14-2004 #1Just Joined!
- Join Date
- Dec 2004
- Posts
- 1
Problems Using A Bash Script ??
Im having problems using a bash script i can get the script to start up and run but im not sure what the commands are from looking at the source of the code its somthing really silly and to do with [local period dest message]
does any one know what [local period dest message] means and how would it be used in term of command many thanks.Code:#!/bin/sh # A name for the script NAME="[msg]" . ./common.sh msg () { local period dest message echo "Period (in seconds) ?" 1>&2 read period echo "Destination (nick or channel) ?" 1>&2 read dest echo "Enter your message (one line) :" 1>&2 read message init while true do echo "privmsg $dest :$message" xsleep $period done } msg | telnet $HOST $DEST
**MOD_EDIT: added 'code' tags
- 12-14-2004 #2Linux Engineer
- Join Date
- Sep 2003
- Location
- Knoxhell, TN
- Posts
- 1,078
When posting source, scripts, error messages, config files, etc., please use the 'code' tags to make it more easily readable and distinguishable from the surrounding text.
Thank You.Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr
- 12-14-2004 #3Just Joined!
- Join Date
- Dec 2004
- Location
- Beijing, China
- Posts
- 4
local is used to declare variables local to self-defined functions


Reply With Quote
