Sponsored Content
Top Forums Shell Programming and Scripting one solution if want fields in a file into each array Post 302368687 by jimmy_y on Thursday 5th of November 2009 10:39:33 AM
Old 11-05-2009
Thanks pludi Smilie
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

split varibles and store fields into shell varible array

I need to split a long varible which is a whole line read from a file into fields and store them in an array, the fields are delimited by pipe and a field may contain white spaces. I tried the following concept test and it has problem with field 5 which contain a space, appearently so because... (3 Replies)
Discussion started by: gratus
3 Replies

2. Shell Programming and Scripting

awk reading many fields to array

I want to read $3,$4,$5,$6,$7 of fileA in array and when fileb $1 = fileA $4 the i want to print array and few fields from fileB. This should work but has some syntax error. nawk -F, 'FNR==NR{a=;next} a{print a}' fileB fileA Appreciate if someone can correct this. (2 Replies)
Discussion started by: pinnacle
2 Replies

3. Shell Programming and Scripting

Ksh array solution.

I was wondering if ksh supported arrays. I have a script that may work with several hosts. I'd like a means of knowing how many hosts I'm working with and an easy way to access them (as variables) in a loop. I'm assuming there's some kind of foreach in shell scripting. (1 Reply)
Discussion started by: mrwatkin
1 Replies

4. Shell Programming and Scripting

how to spilit a row into fields and store the field content to the array

consider this is a line A#B#C#D#E#F#G#H note the delimeter is # i want to cut or spilt in to fields using the delimeter # and to store in an array. like this array=A array=B array=C array=D array=E and the array content should be displayed. echo "${array}" echo "${array}"... (5 Replies)
Discussion started by: barani75
5 Replies

5. UNIX for Dummies Questions & Answers

Fill fields with awk from an array?

Hi experts, I have been trying for a while to accomplish the following task using awk, and I just don't seem find find a way. I am not particular about using awk, it just seemed like the logical choice at first. I have a file that contains 5 fields that are delimited by a space character.... (1 Reply)
Discussion started by: GermanicGalore
1 Replies

6. Shell Programming and Scripting

awk two fields in one array

I want to compare these files while putting $1 and $2 into an array and getting rid of the punctuation. What am i doing wrong? File1.txt Apple # 223 Peach # 84; Banana # 1605. Banana # 1605; Orange # 6; Peach # 84 Peach # 84; Apple # 229; Banana # 1605. Peach # 84 Apple, # 229;... (3 Replies)
Discussion started by: sdf
3 Replies

7. Shell Programming and Scripting

Psql output into array and read 2 fields into different variables

Hello Just edited the entry to make it easier to understand what i want How can i achieve this: GOAL: read 2 field from a table with PSQL result of this PSQL command is this INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'") ... (0 Replies)
Discussion started by: winston6071
0 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)
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy