09-04-2015
Thanks all - some great solutions there that work. That AWK is a really powerful tool.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Gurus,
I have a file
1|usa|hh
2|usa|ll
3|usa|vg
4|usa|vg
5|usa|vg
6|usa|vg
7|usa|ll
8|uk|nn
9|uk|bb
10|uk|bb
11|kuwait|mm
12|kuwait|jkj
13|kuwait|mm
14|dubai|hh
I want to group by last two columns and get the last two recs and count. (3 Replies)
Discussion started by: sumeet
3 Replies
2. Shell Programming and Scripting
suppose u have a file
ACFCFACCACARCSHFARCVJVASTVAJFTVAJVGHBAJ
another file
A
C
F
R
then output shud be
A= 9
C=7
F=3
R=2
Thanks (12 Replies)
Discussion started by: cdfd123
12 Replies
3. Shell Programming and Scripting
i want to match a pattern
* ^Subject:.*<\hello\>
for my emails to me that has 'hello' anywhere in the subject. (3 Replies)
Discussion started by: oxoxo
3 Replies
4. Shell Programming and Scripting
Hi
I have a file containing 1000+ lines of netlist data.
I need to search for text between two key words on each line
for e.g my input file has
"ABC.ABC__312.deftr_0.X143.Xntys_0.\Xetabc__ABC_test_tz .X1023" "ABC.ABC__312.asjartwtsj"... (16 Replies)
Discussion started by: naveen@
16 Replies
5. Shell Programming and Scripting
Hi All,
I've been trying solve this with a simple command but not having much luck. I have a file like this:
Line 1: random_description 123/alert/high random_description2 356/alert/slow
Line 2: random_description3 654/alert/medium
Line 3: random_description4 234/alert/critical
I'm... (7 Replies)
Discussion started by: joe19
7 Replies
6. Shell Programming and Scripting
Hi,
I have a master file that i need to split into multiple files based on matched patterns. sample of my data as follows:-
scaff_1 a e 123 130 c_scaff_100
scaff_1 a e 132 138 c_scaff_101
scaff_1 a e 140 150 ... (2 Replies)
Discussion started by: redse171
2 Replies
7. UNIX for Dummies Questions & Answers
I have a file with the following text:
grep \$
grep \\$
grep \\\$
grep '\$'
grep '\'$'
grep \\
grep \\\\
grep "\$"
grep '"$'
grep "$"
When I perform these same commands on this file, the result are never what I would expect them to be. Could someone please comment on the results and... (3 Replies)
Discussion started by: uran101
3 Replies
8. Shell Programming and Scripting
/etc/group
tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453
bin::2:root,daemon
sys::3:root,bin,adm
adm::4:root,daemon
uucp::5:root
/etc/passwd
mk789:x:234:1::/export/home/dummy:/bin/sh
po312:x:234:1::/export/home/dummy:/bin/sh
ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies
9. Shell Programming and Scripting
Hi Experts,
I have a log file like this.I need to filter the Index name and elapsed time(only created ).
06:36:39 SQL> create index XYZ_F75 on XYZ
06:36:39 2 ("GRP_ID", "_ID") parallel 64 nologging
06:36:39 3 tablespace XARGS_IDX
06:36:39 4 ;
Index created.
Elapsed:... (2 Replies)
Discussion started by: navsan420
2 Replies
10. Shell Programming and Scripting
I am trying to grep a variable with multiple lines with multiple patterns
below is the pattern list in a variable called "grouplst", each pattern is speerated by "|"
grouplst="example1|example2|example3|example4|example5|example6|example7"
I need to use the patterns above to grep a... (2 Replies)
Discussion started by: ajetangay
2 Replies
LEARN ABOUT OPENSOLARIS
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)