08-13-2007
Thanks lorcan, it works beautifully. Wish i were as good as you guys.
Thanks again
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am a newb as far as shell scripting and SED goes so bear with me on this one.
I want to basically append to each line in a file a delimiter character and the line's line number e.g
Change the file from :-
aaaaaa
bbbbbb
cccccc
to:-
aaaaaa;1
bbbbbb;2
cccccc;3
I have worked... (4 Replies)
Discussion started by: pjcwhite
4 Replies
2. Shell Programming and Scripting
Hello,
I have got a C file in which I would like to add an include statement of my own.
There are already a few include statements and mine should come right after the last existing one (to be neat).
With grep I can get the lines containing the word 'include' and I guess I should feed the... (7 Replies)
Discussion started by: maxvirrozeito
7 Replies
3. Shell Programming and Scripting
Hi all,
I have to append every alternate line after its previous line. For example if my file has following contents
line 1: unix is an OS
line 2: it is open source
line 3: it supports shell programming
line 4: we can write shell scripts
Required output should be
line1: unix is an OS it is... (4 Replies)
Discussion started by: rish_max
4 Replies
4. Shell Programming and Scripting
Hi,
How can I remove the line beak in the following case if the line begin with the special char “;”?
TEXT
Text;text
;text
Text;text;text
I want to convert the text to:
Text;text;text
Text;text;text
I have already tried to use... (31 Replies)
Discussion started by: research3
31 Replies
5. Shell Programming and Scripting
I know this has been asked before but I just can't parse the syntax as explained. I have a set of files that has user information spread out over two lines that I wish to merge into one:
User1NameLast User1NameFirst User1Address
E-Mail:User1email
User2NameLast User2NameFirst User2Address... (11 Replies)
Discussion started by: walkerwheeler
11 Replies
6. Shell Programming and Scripting
Hi Experts,
Am relatively new to shell programming so would appreciate some help in this regard.
I am looking at reading from a file, line by line, picking the first word of each line and appending it to the end of the line.
Any suggestions?
INPUT FILE -
3735051 :... (7 Replies)
Discussion started by: hj007
7 Replies
7. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
8. UNIX for Dummies Questions & Answers
Hello All,
I have a scenario to read a file containing text like this:(say file name is Dummy.txt)
/home/abc/test1/ | file1
/home/abc/test2/ | file2
I used a variable to store the content from file like this (say for line1):
File=`head -1 Dummy.txt | cut -f1 -d "|"`
Dir=`head -1 Dummy.txt... (2 Replies)
Discussion started by: Quesemail
2 Replies
9. Shell Programming and Scripting
Okay, so I have a rather large text file and will have to process many more and this will save me hours of work.
I'm not very good at scripting, so bear with me please.
Working on Linux RHEL
I've been able to filter and edit and clean up using sed, but I have a problem with moving lines.
... (9 Replies)
Discussion started by: rex007can
9 Replies
10. Shell Programming and Scripting
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
ppmd(1) utils ppmd(1)
NAME
ppmd - file-to-file compressor
SYNTAX
ppmd [e|d] [switches] filename...|wildcard...
DESCRIPTION
It is written for embedding in user programs mainly and it is not intended for immediate use. I was interested in speed and performance
improvements of abstract PPM model [1-6] only, without tuning it to particular data types, therefore compressor works good enough for
texts, but it is not so good for nonhomogeneous files (executables) and for noisy analog data (sounds, pictures etc.). Program is very mem-
ory consuming, you can choose balance between execution speed and memory economy, on one hand, and compression performance, on another
hand, with the help of model order selection option (-o).
OPTIONS
-d Delete file[s] after processing, default: disabled.
-s Silent mode.
-fName Set output file name to Name.
-mN Use N MB memory - [1,256], default: 10. The PPMII algorithm might need a lot of memory, especially when used on large files and/or
used with large model order. If ppmd needs more memory than you give it, the compression will be worse. The exact effect is depen-
dent on the -r option.
-oN Set model order to N - [2,16], default: 4. Bigger model orders almost surely results in better compression and surely more memory
and CPU usage.
-r{0,1,2}
Methods of restoration of model correctness at memory insufficiency:
'-r0 - restart model from scratch'. This method is not optimal for any type of data sources, but it works fast and efficient in
average, so it is the recommended method (default).
'-r1 - cut off model'. This method is optimal for quasistationary sources when the period of stationarity is much larger than
period between cutoffs. As a rule, it gives better results, but it is slower than other methods and it is unstable against fragmen-
tation of memory heap at high model orders and low memory.
'-r2 - freeze model'. This method is optimal for stationary sources (show me such source when You will find it ;-)). It is fast
and efficient for such sources.
EXAMPLES
To run this program the standard way type:
ppmd e /tmp/myfile
Alternatively you can run it as:
ppmd -e -o 16 /tmp/myfile
AUTHORS
PPMd was written by Dmitry Shkarin <dmitry.shkarin@mtu-net.ru> and Dmitry Subbotin.
SEE ALSO
gzip(1), bzip2(1), lzma(1).
10.1 2011-07-25 ppmd(1)