I am trying to process error files in selected directories. I can count the files that are there and export the contents to a file for either emailing or printing. The next step is to move the files to a processed directory with the name changed to .fixed as the last extension.
for file in... (2 Replies)
Hi All,
I have a little awk script which uses a variable (x):
awk -v x=0 'NF != 6 { ++x } END { print "This batch had " x " errors out of ", NR" records"}'
But when I've tried to put the command in a file I can't seem to declare the variable. I've managed to simplify the code so that I... (4 Replies)
Guys,
Could you please help me out. I need two values in two variables using awk from the o/p of grep.
example:-
grep sdosanjh <filename>
sdosanjh myhostname myfilename
NOW WHAT I WANT IS :-
sdosanjh should be in variable (say NAME)
myhostname should be in variable (say... (8 Replies)
Hi There,
I am writing a ksh script which assigns variable values from file "A" and passes that variables to file "B". While passing the parameters an additional "$" sign is being assigned to awk -v option.
Could any one help me with this please.
#!/bin/ksh
head -1... (3 Replies)
So, in awk, I've always put my variable assignments inside of the curly braces, just like dad, and grandpa, and the 26 generations before them. But today I came upon an awk statement that had them outside the braces-- blasphemy!
Seriously, though, is there any practical difference? I was... (3 Replies)
Hi everyone,
Ok here's the scenario.
I have a control file like this.
component1,file1,file2,file3,file4,file5
component2,file1,file2,file3,file4,file5I want to do a while loop here to read all files for each component.
file_count=2
while ]
do
file_name=`cat list.txt | grep... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
couldn't print out stored variable in awk
2. Relevant commands, code, scripts, algorithms:
i have in a... (5 Replies)
Hi,
Was hoping someone could help with the following:
while read line; do pntadm -P $line | awk '{if (( $2 == 00 && $1 != 00 ) || ( $2 == 04 )) print $3,$5}'; done < /tmp/subnet_list
Anyone know if it is possible to assign $3 and $5 to separate variables within the {} brackets?
Thanks... (14 Replies)
i have a unique scenario id like help with.
im currently running this command and it does what i want:
printf '%s\n' "${RawContent}" | awk '/## Beginning Stages ##/,/## Ending Stages ##/' | awk '!/^#.*\!|^#\!|DefaultError/'
Can this be shortened? I'm looking for something portable as... (8 Replies)
Discussion started by: SkySmart
8 Replies
LEARN ABOUT MINIX
ppmtosixel
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)