Prompt User for Pgm Output Destination


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Prompt User for Pgm Output Destination
# 1  
Old 02-28-2006
Prompt User for Pgm Output Destination

SCO Open Server 5

A program that I am working with outputs data to a system or printer with the traditional output
> lp [-options] [system-printer]

This output line along with some other job output formatting information is stored as a defined output within the program so that the average user scrolls the list of defined outputs, such as, HPLaser1, and the corresponding settings and destination are handled.

I am working with a fax package for the system which, in the majestic simplicity of UNIX, works much the same as above. The output sequence is
> fax [-options] [phone-number]

again..

> fax -a -t 5551212

This is great for setting up as a standard destination within the program as long as the user always wants to select "FAX-Office2", knowing that the output always needs to go to the fax machine in office2 with the phone number 5551212.

How can I create an output sequence that would prompt the user to input the destination digits? The goal is for the user to select "OutboundFAX"... Which is already defined as a destination in the software of

> fax -a -t [prompt user for destination phone number]

System would respond:
"Please enter fax phone number"
?

After receiving input, system would proceed

> fax -a -t uservariable

Thanks,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to prompt user to define a variable?

Hi everyone, Is it possible to define blank vaianbles and prompt user to fill them during the script execution? A very simple example: INPUT= OUTPUT= cut -f1-4 $INPUT | sed 's/hello/goodbye/g' | sort -uV > $OUTPUTThank you in advance! Best wishes (2 Replies)
Discussion started by: lsantome
2 Replies

2. Shell Programming and Scripting

User prompt for perl

perl -aF/\\t/ -lne 'BEGIN{%m=map{chomp;s/\cM|\cJ//g;$p=join("\t",(split/\t/));($p,$_)} <>;$m{"#CHROM\tINFO"}=$m{"Chr\tSegment Position"}};/SEGPOS=(\d+)/ || /\t(INFO)\t/ or next;$p=$F."\t".$1;exists $m{$p} and print join("\t",$_,$m{$p})' 12345_Marfan20_Output_Mutation_Report.txt <... (3 Replies)
Discussion started by: cmccabe
3 Replies

3. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

4. UNIX for Dummies Questions & Answers

Linux user prompt

Hi, I cant seem to get this right. Lets say I have root privileges and I wanted: a ) edit the user prompt to show "linux1234$" whenever they log-in. also b ) Show a message for users upon logging in. I know a) has something to do with editing PS1. but how to only apply the change for users?... (1 Reply)
Discussion started by: Azi
1 Replies

5. Shell Programming and Scripting

Prompt user for info

Please forgive this newbie question. I have a need to create a script that asks a user for information. Something like: What is the name: $NAME_TYPED_HERE Is $NAME_TYPED_HERE Correct ? YES (NO would go back to -What is the Name-) mkdir then goes on behind the scene and makes folder called... (1 Reply)
Discussion started by: crowman
1 Replies

6. AIX

Not able to create a new user through prompt and smit

Hi, I tried to create a user through smit and command and getting the error: 3004-698 Error committing changes Please suggest. Regards, Ravi Dwivedi (1 Reply)
Discussion started by: dwiravi
1 Replies

7. UNIX for Dummies Questions & Answers

change user> to user@host> ssh prompt

Hi, I was wondering how to change the prompt for my ssh login. At the moment it is like user> while I'd like it to be as user@host> It is in the .bash_profile or .ssh ??? Thanks (2 Replies)
Discussion started by: pmasterkim
2 Replies

8. Shell Programming and Scripting

Help with a user prompt

Hi, I am attempting to write a BASH shell script that will prompt users for responses before accomplishing some tasks. Due to the top-to-bottom nature of shell scripts, asking users questions in sequence is quite easy. However, I am interested in allowing users to go back to and re-answer... (1 Reply)
Discussion started by: msb65
1 Replies

9. HP-UX

FTP user information on destination server

Could any one please tell me how to check the ftp users information on the destination server ( Hp-UX ) ? Source server used to do FTP to my server ( that is destination server ) . Now , he is getting error that login is incorrect and unable to login into destination server . Please tell me how to... (3 Replies)
Discussion started by: randhir
3 Replies

10. Programming

Pgm Output is Interleaved with other pgms

Hi I have a shared object which is called from a third party tool. In my .so, I am using 'freopen(mylogfilename,"at",stderr)'. It is logging all my program output and it is also writing warning messages from the third party daemons also. How can I avoid these unwanted messages... (1 Reply)
Discussion started by: axes
1 Replies
Login or Register to Ask a Question
WHACK(1)						      General Commands Manual							  WHACK(1)

NAME
whack - mangle requests to a printer or damage a printer SYNOPSIS
whack [-h | -v] [-i] [-w] ids whack [-j] [-v] [-s] [-w] printers DESCRIPTION
whack mangles line printer requests or damages line printers. When the first form of the command is used, the printed output of the job is mangled as specified by the options. When the second form of the command is used, the printer itself is damaged as specified by the options. OPTIONS
-h Horizontal. Make the output run across the page horizontally, ignoring linefeeds and other form movement characters or embedded commands. -v Vertical. Make the output run vertically in one column (the current column) down the paper, ignoring any form movement characters or embedded commands. -i ISO mode. Select, at random, a different ISO code set to use while printing the rest of the job. -w Write a taunting message on the user's terminal after the jobs have been whacked. If the user is not logged in locally, then mail will be sent instead. -j Jam. Self-explanitory. -v Voltage surge. Send a voltage spike down the transmit lead(s) of the printer. Physical contact with the printer should be avoided while using the -v option. -s Spit. Causes the printer to rapidly eject it's paper load into the output bin. Depending upon the speed of the ejection, a few characters could actually print on each page. FILES
/etc/termcap HISTORY
Written by Eric L. Pederson <eric@bofh.org.uk>. 28 September 1995 WHACK(1)