09-09-2017
Welcome to the forum.
Your request is not quite clear. Please exercise due care when phrasing your specification. Do you want to replace tu8tu5 with the string constant $blckntifypass or the respective variable's contents? Are the single quotes around it required in your result, or are they to enable shell expansion of the variable? Is that the only line in the file or has it to be selected, are there more occurrences of tu8tu5?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi,
I need to write a command with sed to find all the lines in a file that contain patterns of three or more characters that repeat once and put them inside perenthezes. I cannot tell sed what pattern to look for. it should find repeated patterns automatically.
example:... (1 Reply)
Discussion started by: metalwarrior
1 Replies
2. UNIX for Advanced & Expert Users
I gotta write a command to change the accounts in /etc/passwd that use a shell other than the bash to bash shell. those accounts that dont use a shell shouldnt get modified. assuming all the shell programs end in sh and other programs dont. and the result should go into /etc/passwd.rev
any hint? (4 Replies)
Discussion started by: metalwarrior
4 Replies
3. Shell Programming and Scripting
HI,
Can't seem to find anything on the forums to fix this.
I have a file, one line within this will not have a specific string at the end.
I have the string, but need to append it to the specific line which has it missing.
I need to use a variable for this, $string - I am using double... (13 Replies)
Discussion started by: mandriver
13 Replies
4. Shell Programming and Scripting
Hi,
I am trying to write a shell script designed to take input line by line by line from a file with a word on each line for editing with sed. Example file:
1.ejverything
2.bllown
3.maikling
4.manegement
5.existjing
6.systems
My design currently takes input from the user, and... (2 Replies)
Discussion started by: mkfitzwilliams
2 Replies
5. Shell Programming and Scripting
Hi All,
I need your assistance, I would like to replace all lines beginning with the word "begin" with the below text:
Device | IPMB0-A | IPMB0-B
Board Address |Sent SentErr %Errr |Sent SentErr ... (9 Replies)
Discussion started by: Dendany83
9 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I need your assistance, I would like to replace all lines beginning with the word "begin" with the below text:
Device | IPMB0-A | IPMB0-B
Board Address |Sent SentErr %Errr |Sent SentErr ... (10 Replies)
Discussion started by: Dendany83
10 Replies
7. Shell Programming and Scripting
Howdy folks,
I'm trying to craft a log file summarisation tool for an application that creates a lot of duplicate entries with only a different suffix to indicate point of execution. I thought I'd gotten close but I'm clearly missing something.
Here's a genericized version:
A text_file... (3 Replies)
Discussion started by: mthespian
3 Replies
8. UNIX for Dummies Questions & Answers
Hello all,
I need some help and education creating a script.
Basically I have a file with a list of numbers..
2125554444
2124445555
I need to put them into a format that looks like this....
UQ-V8.1,2125554444,hdaudio
UQ-V8.1,2124445555,hdaudio
Any help would be greatly... (6 Replies)
Discussion started by: jay11789
6 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I'm attempting to play with sed commands again...
I have a file named test1 with numbers...ex:5551234567
I run this sed on the file...
cat test1 | sed 's/^/homeDnModify "/g' | sed 's/$/" "" 3/g' >test2
Im hoping it will look like this...
homeDnModify "551235" "4567" ""... (5 Replies)
Discussion started by: jay11789
5 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to extract line number (first number), as well as everything from TSVal onwards.
4 1.474005 172.18.124.142 -> 74.125.228.46 TCP 2450940617 74 44021 > https Seq=0 Win=5840 Len=0 MSS=1380 SACK_PERM=1 TSval=2450940617 TSecr=0 WS=64
6 1.488149 172.18.124.142 ->... (1 Reply)
Discussion started by: sand1234
1 Replies
LEARN ABOUT PLAN9
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)