03-18-2006
In a start up script, you are seldom simply talking to a tty device. Instead, you are talking to logging program or psuedo device. It captures the messages and sends them to syslog. Eventually someone along the way sends them to the console as well. It is probably line buffered from your description. You could just line with it. Always send a newline character with every echo. This means your prompt won't be on the same line as the user input. Or you could try to explicitly open the console....
exec > /dev/console 2>&1
assuming your console is called /dev/console.
10 More Discussions You Might Find Interesting
1. SuSE
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then... (5 Replies)
Discussion started by: rajranibl
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I've set up a script so that a user answers questions, and then these answers come back onto the screen accompanied by text that I've echoed. Is there a way of putting this into a new file?
Thanks (7 Replies)
Discussion started by: likelylad
7 Replies
3. Shell Programming and Scripting
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies
4. Shell Programming and Scripting
hi all, I am trying to do a loop on a series of plotting function shown below:
colorlist=(blue red green); n=0;
for k in $xy; do
psbasemap $range -JM$scale -B10g5 -X1 -Y1 -P -K > $outfile
pscoast $range -JM$scale -B10g5 -D$res -P -W$lwidth -G$fill -O -K >> $outfile
echo... (1 Reply)
Discussion started by: ida1215
1 Replies
5. UNIX for Dummies Questions & Answers
Could somebody please advise about how to configure pine/alpine so that on exit it doesn't prompt me to save read messages? Thanks (3 Replies)
Discussion started by: LeoKSimon
3 Replies
6. Shell Programming and Scripting
Hello, Unix-Forums.
How can I make a Space after a read prompt? let's assume:
read -p "Are you good?:" varthe output would be ( | is the cursor ):
Are you good?:|But I want it to be:
Are you good?: |That's what I mean.
How would I do that? (2 Replies)
Discussion started by: intelinside
2 Replies
7. Programming
I have built a site in PHP for radio station, and the daily schedule is displayed dynamically using PHP script.
I have added links to view different days but when it loads up its just loading up a new page. I can't quite remember how I done it but I'd like it to be in ajax if that's... (2 Replies)
Discussion started by: AimyThomas
2 Replies
8. Shell Programming and Scripting
Below is a simple script to prompt for user input while suggesting an editable default value at the prompt:
shortname=user1
read -e -i $shortname -p "Please enter the username you would like to add: " input
USERNAME="${input:-$shortname}"
Please enter the username you would like to add:... (3 Replies)
Discussion started by: woodson2
3 Replies
9. UNIX for Dummies Questions & Answers
RedHat Linux 5.8/Korn Shell
I have text file name /etc/oracle/config.loc. It has the following text
#Device/file getting replaced by device +OCR
ocrconfig_loc=+DATA
ocrmirrorconfig_loc=+OCRBut , when I open this file using cat , the PS1 character (for prompt) appears as the last character... (8 Replies)
Discussion started by: omega3
8 Replies
10. Shell Programming and Scripting
A minor nitpick, but I cannot get a statement like:
read -s -n 1 -p "Say Y or N here" -e ANS
to actually hush the response. If I don't use the -p option, the response is silent. With it, I always see the response, and I've tried putting the -s in different spots. Is this a known issue, or... (2 Replies)
Discussion started by: jnojr
2 Replies
LEARN ABOUT OPENSOLARIS
sysmsg
sysmsg(7D) Devices sysmsg(7D)
NAME
sysmsg - system message routing to console devices
SYNOPSIS
/dev/sysmsg
DESCRIPTION
The file /dev/sysmsg routes output to a variable set of console devices. Writes to /dev/sysmsg are always directed to the system console
/dev/console, and are in addition directed to a set of auxiliary console devices managed by consadm(1m).
Only root has permission to write to this device.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsr |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
SEE ALSO
consadm(1m), syslogd(1M) , attributes(5), console(7D)
SunOS 5.11 13 Oct 1998 sysmsg(7D)