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
i have strange behavior i have csh file that run java process something like this :
run_server.csh
#!/usr/bin/tcsh
java -Dtest=testparam -cp ${TEST}/lib/device.jar:${TEST}/conf:${TEST}/lib/commons-logging-1.1.1.jar com.device.server
when i run it like this :... (7 Replies)
Discussion started by: umen
7 Replies
3. 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
4. Shell Programming and Scripting
Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately.
Here's some example output:
Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop
bond0 9 83830... (3 Replies)
Discussion started by: ryran
3 Replies
5. Shell Programming and Scripting
Here's the code... obviously
#!/bin/bash
SRC=$1
function main {
validate
run
}
function validate {
if ]; then
printf "You need to supply a source.\n";
exit 1;
elif ]; then
printf "This is a... (18 Replies)
Discussion started by: Binary Buddha
18 Replies
6. UNIX for Advanced & Expert Users
Hello!
unix os is OSF1 CP1 V4.0 878 alpha.It startup os normally.But when i use
a command to run application, it restart within 10 sec.I have no spare harddisk& application to reinstall.When i asked this problem at this forum, it replys that start up scripts are screwed and to mount each... (12 Replies)
Discussion started by: akzin
12 Replies
7. UNIX for Dummies Questions & Answers
Is there a way with the bourne shell to have different types of files show up a different color when you do ls? (1 Reply)
Discussion started by: resullivan
1 Replies
8. UNIX for Advanced & Expert Users
Hi,
Output of running berkeley ps is truncated to 80 chars when using redirections.
$ /usr/ucb/ps -e 12490|cat #truncated to 80 chars
PID TT S TIME COMMAND
12490 pts/24 S 0:00 sleep 4000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
getting longer lines is done by changing the stty
$... (7 Replies)
Discussion started by: fredy
7 Replies
9. Shell Programming and Scripting
What is mean by "Stopped (tty output)", how can i get rid of it. (3 Replies)
Discussion started by: Chandu
3 Replies
10. UNIX Desktop Questions & Answers
Hello, I am somewhat new to linux. I just installed Red Hat 7.2 and when I try to load gnome or KDE in colors above 8bit it will kind of lock up and display some wierd scrambled cable look. I have an ATI Radeon 7000. I check out my monitor settings they are fine. Is it the graphics card? I set my... (1 Reply)
Discussion started by: Sage3k
1 Replies
ppmcolors(1) General Commands Manual ppmcolors(1)
NAME
ppmcolors - generate a color map of all colors of a certain maxval
SYNOPSIS
ppmcolors [-maxval=maxval]
All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one to designate an option. You may
use either white space or an equals sign between an option name and its value.
DESCRIPTION
ppmcolors generates a PPM color map containing all the colors representable with a certain maxval.
A PPM color map is a regular PPM image that is used by some programs to define a set of colors.
ppmcolors generates a one row PPM image that contains one pixel of each color representable by the maxval you choose. The maxval of the
PPM image is that maxval. Note that you can change the maxval of the color map by running the output of ppmcolors through pnmdepth. As
long as the new maxval is a multiple of the original, the resulting set of colors will be identical. If the new maxval is not a multiple,
the resulting set of colors will be slightly different.
When you select a maxval of 5 (which is the default), you get a color map of the set of "web safe" colors as defined by Netscape. Most web
browsers guarantee that they can produce at least these 216 colors (215 plus black).
pnmcolormap is another program to generate a color map. It chooses a set of colors designed to represent the colors in a specified image
(or simply the set of all the colors in that image, if you choose).
pgmramp performs a similar function for PGM images.
OPTIONS
-maxval=maxval
This is the maxval of the generated color map. Default is 5.
SEE ALSO
pnmdepth(1), pnmcolormap(1), ppmcie(1), ppmrainbow(1), pgmramp(1), ppm(5)
AUTHOR
By Bryan Henderson, December 2001.
20 December 2001 ppmcolors(1)