11-12-2014
Hello LinuxRacr,
Could you please let us know what you are trying to do here. I think we can get the desiered output within awk itself. Kindly let us know the complete requirement. Using awk wihin a loop means each time calling it an may be unnecessarily increasing the execution time for it.
May be we can do things easily within awk itself.
Thanks,
R. Singh
Last edited by RavinderSingh13; 11-12-2014 at 07:56 AM..
Reason: Added a comment line
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have the below input and i only want to filter out some un-wanted info from here. Expected output is below. Can somebody help ?
The catch is that i want to grep those lines with term "k=" and lines with term "**" as the 1st column and "07" as the last column. And the number of... (15 Replies)
Discussion started by: Raynon
15 Replies
2. Shell Programming and Scripting
I have the a file with the following data.
File Content.
1249 snf06.3.0 sw version 1.1 code MD5 192F MD4 MD3
1248 sns06.3.0 sw version 1.1 code MD5 192F MD12
1250 sns06.3.0 sw version 1.1 code MD5 192F0\ MD8
1241 sns06.3.0 sw code MD5 19
1243 sn06.3.0 sw version 1.1 code MD5 19
12... (17 Replies)
Discussion started by: knijjar
17 Replies
3. UNIX for Advanced & Expert Users
I have a file with the below data, i would like to remove the end blank lines with no data. I used the below commands but could not able to succeed, could you please shed some light.
Commands Used:
sed '/^$/d' input.txt > output.txt
grep -v '^$' input.txt > output.txt
input.txt file... (5 Replies)
Discussion started by: Ariean
5 Replies
4. Shell Programming and Scripting
Hi everyone,
My problem is strange, I cannot think of why this is happening.
I have a set of data that looks like this:
Although it does not look it, the fields are tab delimited. I have made sure of this, and awk does recognize them as such. However, it divides what I would expect... (2 Replies)
Discussion started by: ccox85
2 Replies
5. Shell Programming and Scripting
Here's the command I'm running:
# echo "hi" | awk '{etime = system("hostname") ; close("hostname") ; print etime""}'
And here's the ouput:
server.domain.tld
0
Why in the world is that second line, the one that's just "0", there? Many thanks in advance. (2 Replies)
Discussion started by: treesloth
2 Replies
6. Shell Programming and Scripting
I have a .xml file, where i need some output. The xml file is like:
Code:
<?******?></ddddd><sssss>234</dfdffsdf><sdhjh>534</dfdfa>.........
/Code
I need the output like:
code
234
534
.
.
.
/code
How can i do it? (5 Replies)
Discussion started by: anupdas
5 Replies
7. Shell Programming and Scripting
Hi,
I got a log file and I want to grep out a list of unwanted line which are IP's.
Basiclly I want everything ecxept the ip's from my list.
If I do a
while read line
do
grep -v $ip_from_my_list logfile
done <ip_list
it just grep's one IP at a time and repeats. :(
Thanks for... (3 Replies)
Discussion started by: stinkefisch
3 Replies
8. Shell Programming and Scripting
Hi ,
My output contains the below contents
When i execute
df -h | grep / | grep -v '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }'
i get output as below
tpshghghg.fgh.com:/vol/scmvol1/scm-vobstore/WebArch.vbs
1.7T 1.3T 452G 74% /vob/WebArch... (6 Replies)
Discussion started by: ptappeta
6 Replies
9. Shell Programming and Scripting
data.txt:
NEWTEXTS="frq=63,std=-0.00533584,time=Mar-21-(09:15:03)-2016,epoch=1458576903,avg=64.2059,212.698
frq=197,std=0.587585,time=Mar-21-(09:16:02)-2016,epoch=1458576962,avg=64.2059,483.756
frq=178,std=0.503514,time=Mar-21-(09:46:02)-2016,epoch=1458578762,avg=64.2059,500... (5 Replies)
Discussion started by: SkySmart
5 Replies
10. Shell Programming and Scripting
My code fails to do anything if I've BEGIN block in it:
Run the awk script as:
awk -f ~/bin/sum_dupli_gene.awk make_gene_probe.txt
#!/usr/bin/awk -f
BEGIN {
print ARGV
#--loads of stuff
}
END{
#more stuff
} (14 Replies)
Discussion started by: genome
14 Replies
LEARN ABOUT DEBIAN
image_to_j2k
IMAGE_TO_J2K(1) OPENJPEG TOOLS IMAGE_TO_J2K(1)
NAME
image_to_j2k - convert a PNM, PGM, PPM, PGX or BMP into a J2K or JP2 file
SYNOPSIS
DESCRIPTION
image_to_j2k converts an image into a JPEG 2000-encoded image
OPTIONS
-ImgDir sourcedir
Directory of PGM, PPM, PNM, PGX or BMP files to convert
-OutFor extension
J2K or JP2 output file format
-i source
PNM, PGM or PPM file to convert
-o destination
J2K or JP2 file to output to
-h Display help information
-cinema2k fps
Digital Cinema 2K profile compliant codestream for 2K resolution. 24 or 48 fps.
-cinema4k [fps]
Digital Cinema 4K profile compliant codestream for 4K resolution. fps default is 24
-r ratios
compression factor for successive layers, comma seperated
-q psnr
psnr for successive layers, comma seperated
-n rescount
number of resolutions
-b blocksize
width and height of code block, comma-seperated
-c precintsize
width and height of precinct, comma-seperated
-t tilesize
width and height of tile, comma-seperated
-p progression
progression order, one of LRCP, RLCP, RPCL, PCRL, CPRL
-s subsampling
subsampling factor in X and Y, comma-seperated. Values larger than 2 can produce errors
-POC orders
progression order change
-SOP
write SOP marker before each packet
-EPH
write EPH marker after each header packet
-M modeflags
Sum of the values of the modes, as follows:
1. BYPASS (LAZY)
2. RESET
4. RESTART (TERMALL)
8. VSC
16. ERTERM (SEGTERM)
32. SEGMARK (SEGSYM)
-x indexfile
create an index file
-ROI:quantize
quantization indices upshifted for component c between 0 and 2 inclusive with an upshift of U between 0 and 37 inclusive
-d imageoffset
X and Y offset of the origin of the image, comma-seperated
-T tileoffset
X and Y offset of the origin of the tiles, comma-seperated
-I use the irreversible DWT 9-7
EXAMPLE
ratios: 20,10,1 Quality 1: compress 20x; Quality 2: compress 10x; Quality 3: lossless compression
psnr: 30,40,50
quantize: c=0,U=25
orders: T1=0,0,1,5,3,CPRL Title 1: Resolution 0 start, component 0 start, layer 1 end, resolution 5 end, component 3 end, CPRL progression
AUTHOR
Written by Paul Hampson <Paul.Hampson@Pobox.com> based on the output of image_to_j2k -h as part of the Debian packaging of OpenJPEG
COPYRIGHT
Copyright 2007 Paul Hampson
SEE ALSO
j2k_to_image(1), <http://www.openjpeg.org/index.php?menu=doc#encoder>
1.3+dfsg 2014-04-22 IMAGE_TO_J2K(1)