10 More Discussions You Might Find Interesting
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
# print... (1 Reply)
Discussion started by: jessy83
2. Shell Programming and Scripting
I am getting a string in the file, I want to parse the srting and extract the percentage from the string. Sample string are -
ASAdf 2 sd12.34%adnmfk
ASAD112_sd 12.34% adnmfk
I want to extract the numeric value... (3 Replies)
Discussion started by: meetvipin
3. Shell Programming and Scripting
foreach i ( `ls`)
set bh_nm=`echo $file_nm | cut -d"_" -f2`
if($bh_nm !=$umr) then
set bh_ext=`echo $file_nm | cut -d"_" -f4`
set bh_num_nm="$bh_nm $bh_ext a .txt"
mv $file_nm $bh_num_nm
... (1 Reply)
Discussion started by: jdsignature88
4. Shell Programming and Scripting
I would like to know if the parameter i am passing to a shell script is contain
the following charachter : ASM.
I belive that i should use regular expresion here.
Can one help ?
Bellow is the "if statment" i need to fix with the reg exp:
if ; then
#echo "IT IS AN RDBMS... (4 Replies)
Discussion started by: yoavbe
5. UNIX for Dummies Questions & Answers
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
Discussion started by: aadi_uni
6. Shell Programming and Scripting
Here's my script
if echo $number | grep ""
I want this "if" statement to return true only when numbers without letters is matched.
For example 45 - true, 923 - true, r5 - false, tg/f - false and so on.
In this script even a single digit number like "3" returns false.
Thanks. (1 Reply)
Discussion started by: eXPlosion
7. Shell Programming and Scripting
Is my script still error??
i try to running and still error??
need help (1 Reply)
Discussion started by: justbow
Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
9. Shell Programming and Scripting
Is there any way to use in awk a regular exprexion with a format not previusly known?
I mean something like /VAR/ ,obviously VAR is the variable exprexion.
Thak you all in advance. (4 Replies)
Discussion started by: Klashxx
10. UNIX for Dummies Questions & Answers
I receive windows files via the internet on my solaris server. Since unix doesn't handle blanks well I change the blanks to ? which works just fine. I take these files and ftp them to windows so our analysts can work with them. Recently I received a file with the following structure:
... (3 Replies)
Discussion started by: gillbates
ppmtosixel(1) General Commands Manual ppmtosixel(1)
ppmtosixel - convert a portable pixmap into DEC sixel format
ppmtosixel [-raw] [-margin] [ppmfile]
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.
-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.
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.
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?.
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.
Copyright (C) 1991 by Rick Vinci.
26 April 1991 ppmtosixel(1)