04-23-2013
thanks guys.. works good :-)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
2. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
3. Shell Programming and Scripting
Hi guys ,
I m writing a script to delete a line at particular location.
But i m unable to use variable for specifying line number.
for example.
sed -n '7!p' filename
works fine and deletes 7th line from my file
but
sed -n '$variable!p' filename
gives following error.
sed: -e... (12 Replies)
Discussion started by: pinga123
12 Replies
4. Shell Programming and Scripting
Hi,
I want to print the line number with the pattern of the line on a same line using multi-patterns in sed.
But i don't know how to do it.
For example, I have a file
abc
def
ghi
I want to print
1 abc
2 def
3 ghi
I know how to write it one line code, but i don't know how to put... (11 Replies)
Discussion started by: ntpntp
11 Replies
5. Shell Programming and Scripting
I'm trying to update a text file via sed/awk, after a lot of searching I still can't find a code snippet that I can get to work.
Brief overview:
I have user input a line to a variable, I then find a specific value in this line 10th field in this case. After asking for new input and doing some... (14 Replies)
Discussion started by: crownedzero
14 Replies
6. Shell Programming and Scripting
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies
7. Shell Programming and Scripting
Hi, I am trying to use an awk command to replace specific character positions on a line beginning with 80 with contents of another file.
The line beginning with 80 in file1 is as follows:
I want to replace the 000000000178800 (positions 34 - 49) on this file with the contents of... (2 Replies)
Discussion started by: nwalsh88
2 Replies
8. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
9. 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
10. Shell Programming and Scripting
Hi all,
Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE.
for pa in PA_VALUE
blah blah
do
for pb in PB_VALUE
blah blah
do
I have a text file with two columns of values for PA and PB.
14.5 16.7
7.8 9.5
5.6 3.6
etc etc
I would like to read this... (7 Replies)
Discussion started by: crimsonengineer
7 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)