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 > Special Forums > UNIX Desktop for Dummies Questions & Answers
.
google unix.com



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Threads with pipe and select? willil UNIX for Dummies Questions & Answers 3 07-13-2007 09:52 AM
Problems with pipe(...); using select(...); ne2000 High Level Programming 0 01-12-2006 04:18 PM
write data into a text file in bold format miltony UNIX for Dummies Questions & Answers 1 09-28-2005 07:21 AM
Pipe SQL select statement results to script houtakker UNIX for Dummies Questions & Answers 6 10-31-2003 01:20 PM
using the wall or write cmd simon2000 Shell Programming and Scripting 2 06-30-2003 12:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-13-2008
chimodel chimodel is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1
Wall, Write, select users, pipe a text file, HELP Before I'm Bald!

OK... I'm fairly new to unix having the admin handed to me on a platter w/almost no training.
However, being a programmer, I do pick up things fairly easily, but this one is getting the best of me.

I have a unix server that runs multiple versions of the same ERP system, hand crafted for our company.
This system is accessed by our users via telnet pro and automatically brings up an ascii style menu driven by PFkeys.

Each version of this program is defined by "comany".
During our month end process, I need to send a message to ONLY the users of a Specific company.

I've gotten to the point where I can identify all the users of a specific company and grab their tty... however... if I use the write command generically
(write blk < "/usr2/db/etc/tst1" >/dev/pts/244 2>/dev/null & )
even directing it to a specific tty... it always sends it to the initial login and sends the "you're also logged in at..." message to the other instances.

If I use the write command with the -n variable
(write -n c1f1n4.conagra.cag blk pts/244 < /usr2/db/etc/tst1)
... it grabs the correct terminal... but I can't seem to feed the precreated text file to dump to it as I can with the write command with no variables.

I've tried the wall command with similar results... I have to designate the group (as I could create groups based on the company)
(wall -g megvf /usr2/db/etc/tst1)
but again... though the wall command SAYS you can use a filename... it doesn't dump the file, but simply seems to put out the path/filename I typed in as the parameter.

I've tried the tee command too... echo doesn't use a predefined file... the pg command seems to work to an extent
(pg /usr2/db/etc/tst1 | tee /dev/pts/244)
but it also pages to the sending terminal and I'm not sure what that would do if run inside a script.

Not only that... but ALL of the above... except the wall command... do not overwrite the menu the user is viewing when logged in, and all seem to freeze up the users system.

Help... I'm pulling my hair out.
Suggestions or better yet an exact script sample would be great.
  #2 (permalink)  
Old 03-13-2008
benlutgens benlutgens is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 9
try using a pipe?

try
Code:
cat sometextfile | wall
also you wouldn't want to "quote" the path when you're using shell redirect.
so
Code:
wall < "/path/to/file"
would cause that to be a literal string.

Code:
wall < /path/to/file/
should work fine.
Closed Thread

Bookmarks

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 05:23 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