05-08-2012
Each time you run sed, you're processing the entire file, it doesn't wait for all your expressions, i.e. sed 's/a/b/g;s/c/d/g' and so forth. You could assemble the file into one long string to do that, if it's short enough.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am using following code to do some task.
Can somebody please help me to use a for loop for this ?
___________________________________________________
sed s/DATA2/`awk '/ / {print $1}' formated1`/ EOD_Batch > EOD_Batch1
sed s/DATA3/`awk '/ / {print $2}' formated1`/ EOD_Batch1 >... (4 Replies)
Discussion started by: manchau
4 Replies
2. Shell Programming and Scripting
I know a little bit of sed and awk, but not too much. can loop be done in sed.
Baiscally what I want is:
file1:
aaa 111
bbb 222
ccc 333
ddd 444
eee 555
fff 666
Note: the space in between is "tab"
file2:
bbb
ddd
eee
I want delete any entries in file1... (4 Replies)
Discussion started by: redstone
4 Replies
3. Shell Programming and Scripting
Hi All,
I have a big file of 100,000 lines with the following format:
1,736870,736870,1,2,5,547,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445
1,881246,881246,1,2,6,402,1253889535,1253889775,240,30,152.163.141.8,US,0,00,-g 1253889445... (4 Replies)
Discussion started by: toms
4 Replies
4. Shell Programming and Scripting
Input:
3456 565
656 878
235 8
4 8787
3 7
35 878
Expected output:
3456 565
656 878
235 8
4 8787
3 7
35 878
How can i do this with awk,sed and perl? (10 Replies)
Discussion started by: cola
10 Replies
5. Shell Programming and Scripting
Input:
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
Output:
root
daemon
bin
sys
adm
tty (8 Replies)
Discussion started by: cola
8 Replies
6. Shell Programming and Scripting
336 brtr
256 hello
Output:
brtr
hello
How can i do this with sed,awk or perl? (5 Replies)
Discussion started by: cola
5 Replies
7. Shell Programming and Scripting
Input:
:: gstreamer
:: xine-lib
:: xine-lib-extras
Output should be:
gstreamer xine-lib xine-lib-extras
How can it be done with sed or perl? (12 Replies)
Discussion started by: cola
12 Replies
8. Shell Programming and Scripting
Hi guys
First of all a salute to this wonderful platform which has helped me many a times. Im now faced with something that I cannot solve.
I have data like this
11:14:18 0.46975
11:14:18 0.07558
11:14:18 0.00020
11:14:18 0.00120
11:14:18 0.25879
11:14:19 0.00974
11:14:19 0.05656... (13 Replies)
Discussion started by: jamie_123
13 Replies
9. Shell Programming and Scripting
Hi All,
I need help from any of you.Would be so thankful for your help.
I/P
DDDD,1045,161,1557,429,1694,800,1911,1113,2460,1457,2917>
1609,3113,1869,3317,2732,3701,3727,4132,5857,5107>
9004,6496
DDDD,1125,157,1558,429,1694,800,1911,1117,2432,1444,2906>... (2 Replies)
Discussion started by: Indra2011
2 Replies
10. Shell Programming and Scripting
My code below will print only the email address from all lines. I want to convert it with sed or awk.. also what if i just want to find only filenames.
cat LIS_EMAIL | perl -wne'while(/+@+\w+/g){print "$&\n"}'
Hoping to extract the filename such us .exe, .bin. From file that has scrambled... (8 Replies)
Discussion started by: invinzin21
8 Replies
LEARN ABOUT OSF1
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)