05-15-2012
Terminals don't evaluate anything as commands.
Problem: When writing to the terminal, it goes to the screen. When reading from the terminal, it comes from the keyboard. That's just how it works.
To give arbitrary input to a terminal, you have to arrange to have the program run inside a virtual terminal you control. That's one thing the expect language can arrange for you...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
whats the cmd to send messages using terminal to another computer on our network?
We are running SOlaris CDE (5 Replies)
Discussion started by: korupt
5 Replies
2. Programming
Hi folks,
Just wondering if anyone knows how to send intr/break key to remote tty (shell), a simple example would be great!
thx (2 Replies)
Discussion started by: andryk
2 Replies
3. UNIX for Advanced & Expert Users
I'm testing out some ESMTP AUTH stuff, and it requires that the username and password be on the same line separated by a null character. Does anyone know how to echo the ASCII null character?
Thanks,
Alex (3 Replies)
Discussion started by: vertigo23
3 Replies
4. UNIX for Dummies Questions & Answers
Hi Group ,
I m trying to execute commands on some other system using write command but inspite of executing the commands they r passed as simple messages.
- i m writing
>write user-id
! ls
o
ctrl-d
inspite of executing the command ls,other terminal shows ! ls.
Thnx in advance. (2 Replies)
Discussion started by: Aashish
2 Replies
5. Shell Programming and Scripting
hi all
i have script
#!/bin/bash
cd /usr3/prod
grep ERROR /usr3/prod/ind.log > /usr3/prod/ind_err.log
if test -s /usr3/prod/ind_err.log
then
echo "error during process"
else
echo "process succeed"
fi
i want that this message(echo) will be display one time at the top of the screen... (5 Replies)
Discussion started by: naamas03
5 Replies
6. Shell Programming and Scripting
Hello,
I am trying to learn how to pass something more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
______________________________________________
${0##*/}
run... (0 Replies)
Discussion started by: Narnie
0 Replies
7. UNIX for Dummies Questions & Answers
I know how I can pipe any output to another command thats easy |.
What i'm trying to do is send several addresses to the same command over and over again.
Essentially what I want to do is do an nslookup on an address and then take the resulting IP(s) and send each of those IP's to another... (2 Replies)
Discussion started by: MrEddy
2 Replies
8. UNIX for Dummies Questions & Answers
Hi All! I would like your assistance with an issue that I have been having with OS X (Snow Leopard 10.6.8) and sending mail through the Terminal.
I had been trying to send mail from Terminal to my GMail account from my home, where I have a Verizon DSL Internet connection routed through a... (0 Replies)
Discussion started by: danielsutton
0 Replies
9. Shell Programming and Scripting
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
10. Linux
I need to execute apt-cdrom to designate the pendrive using LM 18.3x 'live". (instead of CD-Rom)
Rick (7 Replies)
Discussion started by: 69Rixter
7 Replies
LEARN ABOUT PHP
ncurses_pair_content
NCURSES_PAIR_CONTENT(3) 1 NCURSES_PAIR_CONTENT(3)
ncurses_pair_content - Retrieves foreground and background colors of a color pair
SYNOPSIS
int ncurses_pair_content (int $pair, int &$f, int &$b)
DESCRIPTION
Retrieves the foreground and background colors that constitute the given color pair. Terminal color capabilities must be initialized with
ncurses_start_color(3) prior to calling this function.
PARAMETERS
o $pair
- The number of the color pair to retrieve information for.
o $f
- A reference to which to return the foreground color of the color pair. The information returned will be a color number referring
to one of the pre-defined colors or a color defined previously by ncurses_init_color(3) if the terminal supports color changing.
o $b
- A reference to which to return the background color of the color pair. The information returned will be a color number referring
to one of the pre-defined colors or a color defined previously by ncurses_init_color(3) if the terminal supports color changing.
RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or terminal color capabilities have not been initialized.
SEE ALSO
ncurses_init_pair(3), ncurses_start_color(3).
PHP Documentation Group NCURSES_PAIR_CONTENT(3)