also @ TechSpot: Fair Labor Association begins inspections of Foxconn at Apple's request
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > Software > The Alternative OS

Collaborate in the cloud with Office, Exchange, SharePoint, and Lync

input/output redirection

Thread Tools Search this Thread
  #1  
Old 11-24-2005
Newcomer, in training
 
Location: st. louis
Member since: Jan 2005, 27 posts
input/output redirection

Hi, I need some help with ksh scripting
i have script in which i search for users on command line then in for loop check are they
logged on then i try to send them message:
set brcp4 dxmm4 -m hello just testing program
USERS=`echo $* | sed 's/.*cp4\([^-]*\).*/\1/'
for i in $USERS
tty=`finger | grep $i | cut -c 32-38
write $i $tty <<+ <--------here it tells me "<<" is unmatched? what does it mean?
hello just testing program
+
done
any help why is input redirection tells me unmatched?I need help asap.Thank you.
  #2  
Old 11-24-2005
Nodsu's Avatar
TechSpot Evangelist
 
Location: Estonia
Member since: Feb 2002, 9,431 posts
System specs
You have some problems with for syntax and backticks.

Try something like this:
Code:
#!/bin/ksh
USERS=`echo $* | sed 's/.*cp4\([^-]*\).*/\1/'`
for i in $USERS ; do
tty=`finger | grep $i | cut -c 32-38`
write $i $tty <<+
hello just testing program
+
done
  #3  
Old 12-02-2005
Newcomer, in training
 
Location: st. louis
Member since: Jan 2005, 27 posts
Thanks I got it fixed!
Closed Thread

Similar Topics
Topic Replies Forum
Sound output to Mic input 3 Audio and Video
Google redirection 3 Virus and Malware Removal
Magicjack says "no output/input devices are found" 12 Other Hardware
Browser Redirection 7 Virus and Malware Removal
I need to figure out why a MIDI input would lag on the sound output to the PC speaker 1 Audio and Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 10:22 AM.