10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
What is the correct syntax to pipe or run three awk commands? Basically, using the output of the first awk as input in the second. Then using the output of the second awk in the third. Thank you :).
awk 'FNR==NR {E; next }$3 in E {print $3, $5}' panel_genes.txt RefSeqGene.txt > update.txt |... (3 Replies)
Discussion started by: cmccabe
3 Replies
2. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
3. Shell Programming and Scripting
Hi,
I want to insert a value (x) in the 3rd position of each line in a file like below
a|b|c|d|1
a|b|c|d
a|b|c|d|e|1
a|b|cso that output file looks like
a|b|x|c|d|1
a|b|x|c|d
a|b|x|c|d|e|1
a|b|x|cI can do that using perl as below
#!/usr/bin/perl -w
use strict;
#inserting x at... (5 Replies)
Discussion started by: sam05121988
5 Replies
4. Shell Programming and Scripting
I have file, i am extracting email address from file. but problem is that output is very ugly.
I am using this command
REMOVED "CSS OFFENDING CODE"...
While original filename have no such character. Please suggest. (20 Replies)
Discussion started by: learnbash
20 Replies
5. Shell Programming and Scripting
cat file |grep -v "xx" | grep -v "yy" |grep -v "zz" (3 Replies)
Discussion started by: yanglei_fage
3 Replies
6. UNIX for Dummies Questions & Answers
I want to delete all the blank lines from a file before a certain line number. e.g.
Input file (n: denotes line number)
1: a
2:
3: b
4: c
5:
6: d
I want to delete all blank lines before line number 3, such that my output is:
a
b
c
d
I see that sed '/^$/d' in_file works... (9 Replies)
Discussion started by: jawsnnn
9 Replies
7. UNIX for Dummies Questions & Answers
Hi All. Thanks for your help in advance.
I have a requirement to examine the number of delimiters in each record of a file. If the record has the expected number of delimiters it should be passed into a 'good' file. If it does not, the record should be passed into a 'bad' file. I have been able... (8 Replies)
Discussion started by: codestar1
8 Replies
8. Shell Programming and Scripting
<tr><th align=right valign=top>Faulty_Part</th><td align=left valign=top>readhat version 6.0</td></tr> <tr><th align=right valign=top>Submit_Date</th><td align=left valign=top>2011-04-28 02:08:02</td></tr> .......(a long string)
I want to get all the field between "left valign=top>" and "... (2 Replies)
Discussion started by: yanglei_fage
2 Replies
9. Shell Programming and Scripting
This script is supposed to find out if tomcat is running or not.
#!/bin/sh
if netstat -a | grep `grep ${1}: /tomcat/bases | awk -F: '{print $3}'` > /dev/null
then
echo Tomcat for $1 running
else
echo Tomcat for $1 NOT running
fi
the /tomcat/bases is a file that... (2 Replies)
Discussion started by: ziggy25
2 Replies
10. Shell Programming and Scripting
Is there a way I can do this:
search for text and replace line containing matched text with a different line?
For example:
"I want to replace text"
I want to search for replace and then change the line to
I am perplexed.
Hope that makes sense.
Thanks in advance. (4 Replies)
Discussion started by: arsh
4 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)