08-28-2010
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have this situation in my script (simplified):
A=C
C=10
I need to get number 10 using just A variable.
I tried with :
echo $`echo $A` - but i get $C string (i need number)
Thanks very much for any help! (1 Reply)
Discussion started by: xfouxs
1 Replies
2. Shell Programming and Scripting
#!/bin/bash
#set -x
MAX=255
FILE=$1.dns_list
#declare -a d_arr
if
then
echo "Usage: `basename $0` network"
echo " e.g.`basename $0` 1.1.1"
exit
fi
echo "Remove file $FILE..."
rm $FILE
for (( i = 1; i < $MAX; i++ ))
do
PARSE=$(host $1.${i})
... (3 Replies)
Discussion started by: flee
3 Replies
3. Shell Programming and Scripting
Is it possible with a bash variable to perform multiple substitution strings to one variable?
I have this variable:
echo $clock
TIMEZONE="US/Central"
What I would like to do with bash only it pull out just the "US" part of the variable.. which could be any number of countries.
this is... (6 Replies)
Discussion started by: trey85stang
6 Replies
4. Shell Programming and Scripting
Hi all.
I'm trying to finish a bash script with the following elements:
ARRAY="blah $ITEM blah blah"
ARRAY="blah blah $ITEM blah bluh"
#ARRAY="...."
# ...the ARRAY elements represent a variable but defined
# syntax and they're all hard-coded in the script.
#(...)
ITEMS='1.0 2.3... (2 Replies)
Discussion started by: yomaya
2 Replies
5. Shell Programming and Scripting
Hi,
I need to embed a metatag to image files which contain qrcodes, i usually do this with exiv -M "set Exif.Image.DocumentName `zbarimg -q -Sdisable -Sqrcode.enable --raw image.tif`" image.tif
which works fine. However I need to do this recursivly for whole directory and subdiretory... (4 Replies)
Discussion started by: mcframe
4 Replies
6. Shell Programming and Scripting
I have one script calling another with a set of strings that includes white space. Script A calls Script B with these input strings: one two "th ree"
Script B pulls apart the arguments correctly:
arg0 = one, arg1 = two, arg2 = "th ree"
if I call it from within Script A like so:... (10 Replies)
Discussion started by: skippyV
10 Replies
7. Shell Programming and Scripting
Hi
I am setting the variables like this :
setenv MODULE1 modem5__3
setenv MODULE2 modem5__2
setenv MODULE3 modem_ctrl_1_1
setenv MODULE4 modem_1_0
setenv COUNT 10
I am having a bash script as shown below
################################################
#!/bin/bash
for ((... (5 Replies)
Discussion started by: kshitij
5 Replies
8. Shell Programming and Scripting
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (0 Replies)
Discussion started by: siegfried
0 Replies
9. Shell Programming and Scripting
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (15 Replies)
Discussion started by: siegfried
15 Replies
LEARN ABOUT DEBIAN
foo2slx
foo2slx(1) General Commands Manual foo2slx(1)
NAME
foo2slx - Convert Ghostscript pbmraw or bitcmyk format into a SLX printer stream
SYNOPSIS
foo2slx [options] <pbmraw-file >slx-file
foo2slx [options] <bitcmyk-file >slx-file
foo2slx [options] <pksmraw-file >slx-file
DESCRIPTION
foo2slx converts Ghostscript pbmraw, bitcmyk, or pksmraw output formats to monochrome or color SLX streams, for driving the Lexmark C500
network color laser printer and other SLZ-based printers. The SLX stream is a variant of ZjStream produced by Software Imaging K.K.
COMMAND LINE OPTIONS
Normal Options
These are the options used to select the parameters of a print job that are usually controlled on a per job basis.
-c Force color mode if autodetect doesn't work.
-g xpixxypix
Set page dimensions in pixels [10200x6600].
-m media
Media code to send to printer [0].
-----------------------
Media SLX
-----------------------
plain 0
transparency 1
labels 2
thick1 3
envelope1 4
thin 5
thick2 6
envelope2 7
middle 8
special 9
-p paper
Paper code to send to printer [6].
+---------------+-------------+
| 6 letter | 2 A4 |
| 9 legal | 4 B5 |
| 8 executive | 5 B5iso |
|10 env #10 | 11 env DL |
+---------------+-------------+
-n copies
Number of copies [1].
-r xresxyres
Set device resolution in pixels/inch [1200x600].
-s source
Source (InputSlot) code to send to printer [0].
|0 auto | 1 cassette1
Printer Tweaking Options
These are the options used to customize the operation of foo2slx for a particular printer.
-u xoffxyoff
Set the offset of the start of the printable region from the upper left corner, in pixels [0x0].
-l xoffxyoff
Set the offset of the end of the printable region from the lower right corner, in pixels [0x0].
-L mask
Send logical clipping amounts implied by -u/-l in the ZjStream [3].
0 don't send any logical clipping amounts
1 only send Y clipping amount
2 only send X clipping amount
3 send both X and Y clipping amounts
-A AllIsBlack: convert C=1,M=1,Y=1 to just K=1. Works with bitcmyk input only.
-B BlackClears: K=1 forces C,M,Y to 0. Works with bitcmyk input only.
Debugging Options
These options are used for debugging foo2slx.
-S plane
Output just a single color plane from a color print and print it on the black plane. The default is to output all color planes.
1 Cyan
2 Magenta
3 Yellow
4 Black
-D level
Set Debug level [0].
EXAMPLES
Create a black and white SLX stream:
gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=letter -r1200x600 -sDEVICE=pbmraw
-sOutputFile=- - < testpage.ps
| foo2slx -r1200x600 -g10200x6600 -p1 >testpage.zm
Create a color SLX stream:
gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE
-sPAPERSIZE=letter -g10200x6600 -r1200x600 -sDEVICE=bitcmyk
-sOutputFile=- - < testpage.ps
| foo2slx -r1200x600 -g10200x6600 -p1 >testpage.zc
FILES
/usr/bin/foo2slx
SEE ALSO
foo2slx-wrapper(1), slxdecode(1)
AUTHOR
Rick Richardson <rick.richardson@comcast.net>
http://foo2slx.rkkda.com/