9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
Hello,
I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online:
https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
Within that JSON, I 'm looking for... (4 Replies)
Discussion started by: nbsparks
4 Replies
3. Shell Programming and Scripting
HI
I have file A.txt
_1A
_2A
_3A
_4A
I want define all as different variable.
$1A=_1A
$2B=_2A
$3C=_3A
$4D=_4A
Now i can use any variable in my script. (3 Replies)
Discussion started by: pareshkp
3 Replies
4. Shell Programming and Scripting
Hi,
Is it possible in perl to have a hash defined with variables as theirs key values, like:
%account = ('username' => 'boy', 'password' => $password);
Thanks (1 Reply)
Discussion started by: zing_foru
1 Replies
5. Shell Programming and Scripting
Hi, Unix Gurus,
In our existing file, there is a script like
#!/bin/sh
step=${1:-0}
cur_step=10
if
...
My question is what's "${1:-0}" mean? I know it defines a variable but I don't know what's (1:-0) mean?
:wall:
Thanks in advance. (2 Replies)
Discussion started by: ken002
2 Replies
6. Shell Programming and Scripting
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
Discussion started by: freddy1228
1 Replies
7. UNIX for Dummies Questions & Answers
I have a variable with a value of "05". When I add one to that variable, using the command: CURR_YY=`expr $CURR_YY + 1`, I get the value of "6", losing the leading zero (which is needed for passing to another script). How do I keep the leading zero?
Thank you! (10 Replies)
Discussion started by: cbarker
10 Replies
8. Shell Programming and Scripting
Hello,
I just want to know how If it's possiple to define 2 variable using foreach command ???
I have directory inside that directory around 1000 file, I want to rename all of this files to something I have it in a list. Example :-
------This is what in my directory----------
d1
d2... (14 Replies)
Discussion started by: geoquest
14 Replies
9. UNIX for Dummies Questions & Answers
I am using korn shell unix.
I have a script that I am working with to do a check for me using a text file.
#finds "Time" from the text file and cuts the second field from the #line
A= grep Time test.txt | cut -f2
# the "#Missing" is being pulled from the second field of the text... (1 Reply)
Discussion started by: cspcspcsp
1 Replies
ppmtosixel(1) General Commands Manual ppmtosixel(1)
NAME
ppmtosixel - convert a portable pixmap into DEC sixel format
SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC
LJ250 color inkjet printer.
If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table
begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file.
OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com-
pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni-
tude larger than a compressed file and prints much slower.
-margin
If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci-
fied, a 1.5 inch left margin will offset the image.
PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was
greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the
color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation.
SEE ALSO
ppm(5)
AUTHOR
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)