The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Send console message to all users and tty gfca UNIX for Advanced & Expert Users 2 08-10-2008 12:50 AM
To write to console and file harikamamidala Shell Programming and Scripting 1 07-30-2007 09:53 AM
console message from Crontab run aixhelp UNIX for Dummies Questions & Answers 1 07-11-2007 11:29 AM
How do i access (mount, read & write) a floppy disk from the console, not being root? kfaday UNIX for Dummies Questions & Answers 4 05-13-2005 12:17 PM
console error message boristhespider UNIX for Dummies Questions & Answers 3 09-03-2001 03:49 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 09-01-2008
guruparan18 guruparan18 is offline
Registered User
  
 

Join Date: May 2008
Location: India
Posts: 37
Question WRITE a message in console

Hi all,

I have a requirement, where I need to do some calculations and based on the results I need to write a message to the user from a shell script.

Is it possible to `write' inside the script? Something like the below one..
Code:
#! /bin/ksh

write user12 << EOF
Hello World
<<EOF
For me, it produced an error.
Code:
wrt[6]: here document `EOF' unclosed
Any idea please?
  #2 (permalink)  
Old 09-01-2008
dennis.jacob dennis.jacob is offline Forum Advisor  
dj - the student
  
 

Join Date: Feb 2007
Location: Singapore/Bangalore/Cochin
Posts: 596
Quote:
Originally Posted by guruparan18 View Post
Hi all,

I have a requirement, where I need to do some calculations and based on the results I need to write a message to the user from a shell script.

Is it possible to `write' inside the script? Something like the below one..
Code:
#! /bin/ksh

write user12 << EOF
Hello World
<<EOF
For me, it produced an error.
Code:
wrt[6]: here document `EOF' unclosed
Any idea please?
Try this:

Code:
write user12 << EOF
Hello World
EOF
  #3 (permalink)  
Old 09-01-2008
guruparan18 guruparan18 is offline
Registered User
  
 

Join Date: May 2008
Location: India
Posts: 37
Silly mistake.. Isn't it?!

Thanks a lot Dennis.
Closed Thread

Bookmarks

Tags
inside script, user console, write

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 09:22 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