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
DIRECTOMATIC(1) 					      General Commands Manual						   DIRECTOMATIC(1)

NAME
directomatic - Print without spooler SYNOPSIS
directomatic -P <printdef> [-J jobtitle] [-o option=value [...]] [file] DESCRIPTION
Directomatic is a filter script to print with free software printer drivers without the need of a print spooler. It is designed to be used together with a Foomatic printer definition file. Options -P <printdef> where printdef is the printer definition file to use. -J <jobtitle> where job title will be printed in the head line of every page of a plain text job. -o option=value Set an arbitrary option. file The file to print. Commands Directomatic will print from standard input unless a file to print is specified on the command line. If your printer definition file is in /etc/foomatic/direct or ~/.foomatic/direct you do not need to specify its path. Put a (instructions in the file) to redirect the output of directomatic to your printer instead of standard output. To make normal users able to print this way add them to group lp and make sure the appropriate printer device file /dev/lpX is group-writable. See http://www.linuxprinting.org/direct-doc.html FILES
/etc/foomatic/direct/<queue> The foomatic printer definition file. EXIT STATUS
directomatic returns 0 unless something unexpected happens. AUTHOR
Manfred Wassmann <manolo@NCC-1701.B.Shuttle.de> for the foomatic project using output from the associated binary. BUGS
None so far. Foomatic Project 2001-05-07 DIRECTOMATIC(1)