I was required this output:
I achieved this by writing this:
Which worked for me :-)
Now problem is that, if in future somebody adds one more key to key.txt
i.e.
I want to make my code generic, such that it takes all keys(ID1,ID2,ID3...) in key.txt and print the way I printed above.
(The hierarchy of KEY is as the order in key.txt)
The requirement is to extract 9 fields randomly from a 13 field CSV file to make another CSV file. While doing that, the field 7 and 8 of input csv file should comeout as field 7 of output with the value as first charecters of both 7 and 8 fields of input file(CSV file).
Presently I am using... (1 Reply)
Hello,
I am trying to write a formatted report into a file using .ksh script and awk. Here is the command I am trying to run
echo "before awk" ${SRC_SCHEMA}
echo | awk '{printf "%-20s", ${SRC_SCHEMA} }' >>$REPORT_SQL_NAME
I get the following error
before awk ADW
awk: 0602-562 Field $()... (1 Reply)
Hallo,
i have a file which looks like this:
$1 $2 $3
Student1 55 Pass
55 Pass
35 Fail
Student2 55 Pass
55 Pass
35 Fail
i want that the $1 field... (3 Replies)
Dear all, could you please help me with awk please?
I have such input:
Input:
a d
b e
c f
The number of lines is unknown before reading the file.
I need to print possible combination between the two columns like this:
Output:
a d
b d
c d
a e
b e
c e
a f (2 Replies)
Hi
I am relatively new to awk so i am getting confused a lot
I am in need of help ... I am trying to append coloumns to the end of line using AWK
I tried using this command
awk -F "," '{for(s=7;s<=217;s++);$s="0";}1' OFS=, sam_sri_out
It is giving me an output like this...... (1 Reply)
I have a 1-column file such as the example below:
flower
cat
dog
pizza
car
book
I want to create a second column in which all possible 2-item combinations of column one are outputted in 2 tab-separated columns, such as:
flower flower
cat flower
dog flower
pizza ... (5 Replies)
Input:
A|1
B|2
C|3
D|4
Output:
A+B|3
A+C|4
A+D|5
B+C|5
B+D|6
C+D|7
A+B+C|6
A+B+D|7
A+C+D|8
B+C+D|9
A+B+C+D|10
I only managed to get the output for pairs of $1 values (i.e. combination of length 2): (4 Replies)
hello,
I'm reading this thread, in which there is this code :awk '
function comb(v,i) {
for(i in A) {
delete A;
if(length(A))
comb((v?v"+":x)i)
else print v"+"i
A;
}
}
{ A }
END {
comb();
} ' infilebut I can't understand where does v come... (5 Replies)
In a python script I have 2 files printing side by side on the same line. I want to have 1 of the files to be already displayed at once while the other file print down the list in the file and it still will produce new lines. I want to do it like that to reduce printing a lot of lines and... (0 Replies)
Discussion started by: bigvito19
0 Replies
LEARN ABOUT OSX
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)