04-21-2009
Sample input:
[CODE]
readline:readline-4.3-2:4.3: : :C:R:A library for reading and returning lines from a terminal.: :/bin/rpm -e readline: : : : :0:
sudo:sudo-1.6.7p5-3:1.6.7p5: : :C:R:Allows restricted root access for specified users.: :/bin/rpm -e sudo: : : : :0:
unzip:unzip-5.51-1:5.51: : :C:R:A utility for unpacking zip files.: :/bin/rpm -e unzip: : : : :0:
wget:wget-1.9.1-1:1.9.1: : :C:R:A utility for retrieving files using the HTTP or FTP protocols.: :/bin/rpm -e wget: : : : :0:
zip:zip-2.3-3:2.3: : :C:R:A file compression and packaging utility compatible with PKZIP.: :/bin/rpm -e zip: : : : :0:
[ /CODE]
the output should be identical. Once I'm able to load each line into memory, I will parse through the lines.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Here is my snippet of code...
getDescription()
{
DESCRIPTION=$(dbaccess dncsdb - << ! 2>/dev/null|sed -e 's/hctt_description//' -e '/^$/ d'|tr -d '\r'
select hct_type.hctt_description
from hct_type,hct_profile
where hct_type.hctt_id=hct_profile.hctt_id
and... (5 Replies)
Discussion started by: lyonsd
5 Replies
2. Shell Programming and Scripting
Hi,
I got some log files which print the whole xml message in separate lines:
e.g.
2008-10-01 14:21:44,561 INFO do something
2008-10-01 14:21:44,561 INFO print xml : <?xml version="1.0" encoding="UTF-8"?>
<a>
<b>my data</b>
</a>
2008-10-01 14:21:44,563 INFO do something again
I want... (3 Replies)
Discussion started by: csmklee
3 Replies
3. Shell Programming and Scripting
Hi everyone,
I have gone through the forum trying to find an answer to this question but was unsuccessful. I am hoping that someone can help me with this please.
I am trying to get my script to recognise line breaks from a file and to give me a result for wc of each line. So basically, if you... (7 Replies)
Discussion started by: stargazerr
7 Replies
4. Shell Programming and Scripting
Hi Masters ,
I have a file whose header is like
HDRCZECM8CZCM000000881 SVR00120100401160828+020020100401160828+0200CZK
There is a space between 1 and S ,my req is to chng the space to T
I tried echo `head -1 CDCZECM8CZCM000000881` | sed 's/ /T/'
it works ,but how can I modify in... (5 Replies)
Discussion started by: Pratik4891
5 Replies
5. Shell Programming and Scripting
Hi All,
I've a csv file in which the record is getting break into 1 line or more than one line. I want to combine those splits into one line and remove the unwanted character existing in the record i.e. double quote symbol ("). The line gets break only when the record contains double... (4 Replies)
Discussion started by: rajak.net
4 Replies
6. Programming
Hello,
I want to keep line spaces in comments but clean more then 2 after each.
Example:
$sentence="This is my first sentence
This will be in a new row
This will be too in a new row but not separated with 3line breaks just with
one
";
And i want to... (1 Reply)
Discussion started by: AimyThomas
1 Replies
7. Shell Programming and Scripting
Hi,
Since today, with csh or tcsh, if I do 'ls files* > list',
every lines end with an extra space!
What happenned?
What can I do to go back when there was no extra space?
If I change to bash, there's no extra space.
Thanks,
Patrick
---------- Post updated at 03:19 PM... (1 Reply)
Discussion started by: trogne
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Need an urgent solution to an issue . We have created a ksh file or shell script which generates 1 DAT file. the DAT file contains extract of a select statement .
Now the issue is , when we are executing the ksh file , the output is coimng with page breaks and line breaks .
We have... (4 Replies)
Discussion started by: Ayaskant
4 Replies
9. HP-UX
Dear Concern,
When we using @ sign, line breaks for a particular user in shell. Please advise how to resolve from the problem in HP UX.
tabs@tabsdb02:/ccbs/users/tabs$ cat /etc/passwd|grep tabs
tabs:RdCgOsmKee7Ps:221:201::/ccbs/users/tabs:/usr/bin/ksh... (3 Replies)
Discussion started by: makauser
3 Replies
10. Shell Programming and Scripting
Heyas
I'm trying to read/display a file its content and put borders around it (tui-cat / tui-cat -t(ypwriter).
The typewriter-part is a 'bonus' but still has its own flaws, but thats for later.
So in some way, i'm trying to rewrite cat using bash and other commands.
But sadly it fails on... (2 Replies)
Discussion started by: sea
2 Replies
LEARN ABOUT CENTOS
advzip
AdvanceCOMP ZIP Compression Utility(1) General Commands Manual AdvanceCOMP ZIP Compression Utility(1)
NAME
advzip - AdvanceCOMP ZIP Compression Utility
SYNOPSIS
advzip [-a, --add] [-x, --extract] [-l, --list]
[-z, --recompress] [-t, --test] [-0, --shrink-store]
[-1, --shrink-fast] [-2, --shrink-normal] [-3, --shrink-extra]
[-4, --shrink-insane] [-N, --not-zip] [-p, --pedantic] [-q, --quiet]
[-h, --help] [-V, --version] ARCHIVES... [FILES...]
DESCRIPTION
The main purpose of this utility is to recompress and test the zip archives to get the smallest possible size.
For recompression the 7-Zip (www.7-zip.com) Deflate implementation is used. This implementation generally gives 5-10% more compression than
the zLib Deflate implementation.
For experimental purpose also the 7-Zip LZMA algorithm is available with the -N option. In this case, the generated zips WILL NOT BE USABLE
by any other program. To make them usable you need to recompress them without the -N option. Generally this algorithm gives 10-20% more
compression than the 7-Zip Deflate implementation.
OPTIONS
-a, --add ARCHIVE FILES...
Create the specified archive with the specified files. You must specify only one archive.
-x, --extract ARCHIVE
Extract all the files on the specified archive. You must specify only one archive.
-l, --list ARCHIVES...
List the content of the specified archives.
-z, --recompress ARCHIVES...
Recompress the specified archives. If the -1, -2, -3 options are specified, it's used the smallest file choice from: the previous
compressed data, the new compression and the uncompressed format. If the -0 option is specified the archive is always rewritten
without any compression.
-t, --test ARCHIVES...
Test the specified archives. The tests may be extended with the -p option.
-N, --not-zip
Use the LZMA algorithm when compressing. The generated zips will not be readable by any other application!
-p, --pedantic
Be pedantic on the zip tests. If this flag is enabled some more extensive tests on the zip integrity are done. These tests are gen-
erally not done by other zip utilities.
-0, --shrink-store
Disable the compression. The file is only stored and not compressed. This option is very useful to expand the archives of .png and
.mp3 files. These files are already compressed, trying to compress them another time is really a waste of time and resource.
-1, --shrink-fast
Set the compression level to "fast".
-2, --shrink-normal
Set the compression level to "normal". This is the default level of compression.
-3, --shrink-extra
Set the compression level to "extra".
-4, --shrink-insane
Set the compression level to "insane".
COPYRIGHT
This file is Copyright (C) 2002 Andrea Mazzoleni, Filipe Estima
SEE ALSO
advpng(1), advmng(1), advdef(1)
AdvanceCOMP ZIP Compression Utility(1)