input/output redirection

By deki
Nov 23, 2005
  1. 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
    any help why is input redirection tells me unmatched?I need help asap.Thank you.
  2. Nodsu

    Nodsu TS Rookie Posts: 5,837

    You have some problems with for syntax and backticks.

    Try something like this:
    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
  3. deki

    deki TS Rookie Topic Starter Posts: 25

    Thanks I got it fixed!
Topic Status:
Not open for further replies.

Similar Topics

Create an account or login to comment

You need to be a member in order to leave a comment
TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...

Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.