10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In bash, you can do something like this:
#!/bin/bash
echo -n "What is your name? " > /dev/tty
read thename < /dev/tty
How can I do the same in python?
I have a python script that has the following content:
#!/usr/bin/python2.7
import getpass
import sys
import telnetlib
import... (2 Replies)
Discussion started by: SkySmart
2 Replies
2. Shell Programming and Scripting
Suppose another person wrote the following one-line shell script:
echo $RANDOM > /dev/tty
QUESTION #1: How can the random number, which is output to the terminal by this script, be captured in a variable?
QUESTION #2: How can this be done in a cron job?
Specific code, whether in ksh or... (1 Reply)
Discussion started by: Paul R
1 Replies
3. UNIX for Dummies Questions & Answers
hi,
From the below script:
##########################################pwd_auth.sh########################################################################################
#Author: Pandeeswaran Bhoopathy
#Written on:26th Jan 2012 2:00PM
#This script describes the feature of stty and illustrates... (3 Replies)
Discussion started by: pandeesh
3 Replies
4. UNIX for Dummies Questions & Answers
what can I use to find the last modified time of a /dev/tty ? (4 Replies)
Discussion started by: l flipboi l
4 Replies
5. Programming
Hello everybody:
I have a child process which reads a password from /dev/tty, as far as I know file descriptors for the child process can be seen by using lsof, so I want to connect to such device in order to send the password through a pipe, how could I do that? (2 Replies)
Discussion started by: edgarvm
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I need to provide more than one character to "> /dev/tty" through terminal/keyboard input, I have this:
ok=false
while
do
echo " Enter r1 to reformat "
> /dev/tty
read choice
case $choice in
)
echo " bla bla bla "
;;
done
However, in this way,... (3 Replies)
Discussion started by: Gery
3 Replies
7. Programming
Since the existence of /dev/tty is not guaranteed, what happens when an attempt is made to open /dev/tty and there's no controlling terminal?
Will it fail, or open /dev/null instead? Or do something else?
So is checking for NULL in the code below a safe way of checking whether opening... (2 Replies)
Discussion started by: gencon
2 Replies
8. Solaris
Hi, Anyone can help
My solaris 8 system has the following
/dev/null , /dev/tty and /dev/console
All permission are lrwxrwxrwx
Can this be change to a non-world write ??
any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies
9. Cybersecurity
I suspect that someone is using a sniffer on my Ethernet connection,
OS X 10.3.9, DSL,
ok, I'm in terminal using the "ifconfig" command >
flags=8049<UP,LOOPBACK,RUNNING,MULTICAST>mtu 16384
right, it's not in "promiscuous mode", but i think it's Trojaned, can anyone point me in the... (1 Reply)
Discussion started by: su"do"er
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
When it proccesing the backup with cpio report this message: Cannot open "/dev/tty" and cancel de backup.
Cuando se procesa la tarea del backup reporta el error: Cannot open "/dev/tty" y cancela el backup y no termina correctamente, a que se devera esta advertencia.
Gracias.
Thacks.... (3 Replies)
Discussion started by: cmr88
3 Replies
BLOGD(8) The SuSE boot concept BLOGD(8)
NAME
blogd - boot logging on /dev/console
SYNOPSIS
/sbin/blogd [/dev/realtty]
DESCRIPTION
Without argument blogd determines the real underlying character device of /dev/console. blogd spawns a pty/tty pair to reconnect the cur-
rent /dev/console with the slave of the pty/tty pair. During writing information from this slave to the real character device a ring buffer
is used to hold the information for writing it to an existing logging file.
To fetch the real tty of /dev/console the program showconsole(8) can be used. This has the advantage that blogd will not hold the real
character device of /dev/console as its controlling tty (would hangup any running getty on that character device).
SIGNALS
blogd knows a few signal to contol its behavior.
SIGQUIT, SIGINT, and SIGTERM
will cause blogd tries to write out the ring buffer and to exit.
SIGIO says blogd that now it is able to write on /var/log/boot.msg which means that the file system is mounted read/write and the kernel
messages are written to that file.
SIGSYS says blogd that it should stop writing to disk but continue to repeat messages to the old devices of the system console.
BUGS
blogd needs a mounted /proc and /dev/pts file system and tries to set the controlling tty to stdin if the real character device of
/dev/console is not given. After reading /proc blogd tries to restore the status of the controlling tty to avoid problems with getty pro-
cesses. This can fail because blogd forks to run in the background as a daemon.
FILES
/proc/<pid of blogd>/stat
the stat file of the blogd process.
/dev/console
the system console.
/var/log/boot.msg
logging file which is created by klogd(8) or dmesg(8).
SEE ALSO
showconsole(8), syslogd(8), klogd(8), dmesg(8), proc(5).
COPYRIGHT
2000 Werner Fink, 2000 SuSE GmbH Nuernberg, Germany.
AUTHOR
Werner Fink <werner@suse.de>
3rd Berkeley Distribution Nov 10, 2000 BLOGD(8)