06-06-2011
Retrieving a specific value
I have this input file:
Quote:
wow1>
NLD_0_1: 20.5[dB]
NLD_1_1: 23.9[dB]
NLD_2_1: 12.3
wow4>
NLD_0_1: 26.2[dB]
NLD_1_1: 9.2[dB]
NLD_2_1: 27.8[dB]
wow15>
NLD_0_1: 28.0[dB]
NLD_1_1: 24.2[dB]
NLD_2_1: 8.6[dB]
wow6>
NLD_0_1: 13.9[dB]
NLD_1_1: 13.0[dB]
NLD_2_1: 7.6[dB]
I want to get the following output file:
Output
Quote:
wow1>
NLD_2_1: 12.3[dB]
wow4>
NLD_1_1: 9.2[dB]
wow15>
NLD_2_1: 8.6[dB]
wow6>
NLD_0_1: 13.9[dB]
NLD_1_1: 13.0[dB]
NLD_2_1: 7.6[dB]
Basically, the program would scan the file and look for every instance where the value is < 14.0 dB. The program would then print the row that contains that value along with the corresponding name with the ">".
Be blessed!
10 More Discussions You Might Find Interesting
1. AIX
Hello,
instead of specifying the date manually in the list as below,
for dt in 010106 010206 010306 010406 010506 010606
here for example : 010106 - 1st jan 2006
how to retrieve the date of a week automatically and put in a loop?
is there any way to do?
thanks in advance. (1 Reply)
Discussion started by: sumi
1 Replies
2. UNIX for Dummies Questions & Answers
Hi. I have a situation where I need to constantly read a command's output in order to loop through it to determine something that is happening over our system. The command td <filename> interactively prints 'filename' as text is written to it and this is redirected to standard output. I have been... (8 Replies)
Discussion started by: fidodido
8 Replies
3. UNIX for Dummies Questions & Answers
Friends,
I have a data with 3 columns:
30 41 1
39 19 4
14 25 3
....
....
.....
I want to retrieve any data in the first column that is greater 15. What is the best way to do this?
Thanks! (2 Replies)
Discussion started by: bobo
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Can anyone tell how to list all files in current directory which has more than 0 bytes? (4 Replies)
Discussion started by: sri2005
4 Replies
5. Solaris
Hi,
I am trying to get a small amount of files off of a SunBlade 2000 running SunOS 5.8, but I'm having trouble finding a medium that will actually work. It is not networked, and it doesn't have a writable CD drive. My only options seem to be floppy disk and USB drive. However, when I insert... (11 Replies)
Discussion started by: ryanm
11 Replies
6. Shell Programming and Scripting
Hi there, if i had a file that looked like this
my_server1
red
green
blue
yellow
blue
my_server2
blue
blue
yellow
green
blue
my_server3
yellow (9 Replies)
Discussion started by: hcclnoodles
9 Replies
7. Shell Programming and Scripting
Hi .,
I have 3 records in a oracle table... wen i connect to oracle from unix environment and query the table i get some errors...
the script i used is
g=`sqlplus -s "username/password" << EOF
select column from table;
EOF`
if
then
echo $g
fi
The output i get... (1 Reply)
Discussion started by: cratercrabs
1 Replies
8. Shell Programming and Scripting
Hi All..
I have a Filename as
FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis
I want to get the result as... (5 Replies)
Discussion started by: asheshrocky
5 Replies
9. UNIX for Dummies Questions & Answers
I have input file like
AAA
AAA
CCC
CCC
CCC
EEE
EEE
EEE
EEE
FFF
FFF
GGG
GGG
i was trying to retrieve data between two strings using sed.
sed -n /CCC/,/FFF/p input_file
Am getting output like
CCC
CCC
CCC (22 Replies)
Discussion started by: NareshN
22 Replies
10. Shell Programming and Scripting
Hi
I have a script which am trying to pass an argument which am trying to call using $1 but its not taking the value inside the if loop as it showing the error as if: Empty if..
Any help on this will be helpful.
#!/usr/bin/csh
echo $1
if ('$1' == "pp")
then
echo "Printing $1"
endif (4 Replies)
Discussion started by: rogerben
4 Replies
LEARN ABOUT REDHAT
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)