Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Login to participate.
|
|||||||
input/output redirection
![]() |
| Thread Tools |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
Thanks I got it fixed!
|
![]() |
| Thread Tools | |
|
| Similar Topics | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Folder redirection not redirecting all files!!! | kamakazi999 | Storage & Networking | 0 | 07-26-2005 06:18 AM |
| Folder Redirection in Active Directory | acidosmosis | Storage & Networking | 4 | 06-29-2004 04:23 PM |
All times are GMT -4. The time now is 07:48 AM.



