09-04-2006
Quote:
Originally Posted by noodlesoup
I'm having trouble storing the value of the filesize in a variable and also how to get the data displayed like I would like it above in columns.
Use arrays to store the values (to get filesize you can use something like
$size=`ls -l | awk '{print $5}'`). Look at
http://www.tldp.org/LDP/abs/html/arrays.html
Quote:
Originally Posted by noodlesoup
I was thing of having the example stored to a file as then I can have the 3rd column sorted by the compression of the file.
Pipe your output through the
sort
Quote:
Originally Posted by noodlesoup
each of the values should be in columns also.
Try '\t'
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've noticed bzip2 gives a little bit better compression than gzip. So...I'm curious...what's gives the best compression out of all the compression utilities?
Thanks! (6 Replies)
Discussion started by: jalburger
6 Replies
2. UNIX for Dummies Questions & Answers
I have heard that bz2 compression a relatively new compression encoding algorithm, far superior to tar and gz. I also remember that I downloaded a FreeBSD LiveCD a while back that was only a couple hundred megs instead of the usual 650ish using bz2 - big difference, I'd say. But to the point, what... (4 Replies)
Discussion started by: Phobos
4 Replies
3. Shell Programming and Scripting
in the instance of a file compressed with compress to a .Z extension...
how would I, in the Bourne Shell, capture its compression ratio? Gunzip returns -1 and I'd then gone down the track of roughly calculating the ratio (not including time) manually.
Until I found out the Bourne Shell... (7 Replies)
Discussion started by: nortypig
7 Replies
4. UNIX for Advanced & Expert Users
Hi everybody,
Does anybody know,whether linux-2.4.20-8 supports predictor1 compression in PPP protocol support,as i was able to see there were only two compression techniques that r being supported i.e bsd and
deflate compression from "make menuconfig" under network device... (0 Replies)
Discussion started by: sriram.ec
0 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I have a .z file which i understand to be UNIX.
I'm on PC (no UNIX boxes) and have tried many different unzipping programs to extract this .z file, but only PicoZip has allowed me to view what is inside (telling me, i think, that it's not corrupt), but i have not been able to extract... (3 Replies)
Discussion started by: Gonecat
3 Replies
6. UNIX for Dummies Questions & Answers
Hi Guys,
I'm just wondering how to compress and decompress a file in the same script using multiple programs, and can it be done in one line?
e.g gzip file && gunzip file
bzip2 file && bunzip file
I tried this and a few other combinations but it doesn't seem to work. Any... (6 Replies)
Discussion started by: Spaulds
6 Replies
7. Shell Programming and Scripting
Hi Guys,
totally new to scripting.
I have a huge list of foleders.
I want to tar the contents of each folder inside the same folder and the name of the tar file is the same name as the folder.
how would I go about this in scirpt?
cheers
Viper (3 Replies)
Discussion started by: brownviper1966
3 Replies
8. Shell Programming and Scripting
I'am looking for script (or tool) that would compress all files with given extension in all subdirectory. Important part is that every one file have to end in separate archive whit it's own name.
Eaven if I could point multiple file in one directory and compress them it would be ok.
I' am... (1 Reply)
Discussion started by: Demerzel
1 Replies
9. Linux
Hi all,
I am working on a sample backup code, where i read the files per 7200 bytes and send it to server. Before sending to server, i compress each 7200 bytes using zlib compression algorithm using dictionary max length of 1.5 MB . I find zlib is slow.
Can anyone recommend me a... (3 Replies)
Discussion started by: selvarajvss
3 Replies
10. UNIX for Advanced & Expert Users
Hi ,
1-I need to know please if it's possible to compress using openssl?
Here is the version used:
openssl version -a
OpenSSL 0.9.7d 17 Mar 2004 (+ security fixes for: CVE-2005-2969 CVE-2006-2937 CVE-2006-2940 CVE2006-3738 CVE-2006-4339 CVE-2006-4343 CVE-2007-5135 CVE-2008-5077... (3 Replies)
Discussion started by: Eman_in_forum
3 Replies
ppmtopgm(1) General Commands Manual ppmtopgm(1)
NAME
ppmtopgm - convert a portable pixmap into a portable graymap
SYNOPSIS
ppmtopgm [ppmfile]
DESCRIPTION
Reads a portable pixmap as input. Produces a portable graymap as output. The output is a "black and white" rendering of the original
image, as in a black and white photograph. The quantization formula used is .299 r + .587 g + .114 b.
Note that although there is a pgmtoppm program, it is not necessary for simple conversions from pgm to ppm , because any ppm program can
read pgm (and pbm ) files automatically. pgmtoppm is for colorizing a pgm file. Also, see ppmtorgb3 for a different way of converting
color to gray. And ppmdist generates a grayscale image from a color image, but in a way that makes it easy to differentiate the original
colors, not necessarily a way that looks like a black and white photograph.
QUOTE
Cold-hearted orb that rules the night
Removes the colors from our sight
Red is gray, and yellow white
But we decide which is right
And which is a quantization error.
SEE ALSO
pgmtoppm(1),ppmtorgb3(1),rgb3toppm(1),ppmdist(1),ppm(5),pgm(5)
AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
10 April 2000 ppmtopgm(1)