10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hey guys,
I want to do something quite simple but I just can't no matter what I try. I have a large file and i usually just:
gzcat test.gz | nohup /test/this-script-does-things-to-the-records.pl -> /testdir/tmp_test.txt
But now I need to do it only for the first 100k records. I sure... (7 Replies)
Discussion started by: sg3
7 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am using under-noted script and getting the error as under. Please help.
Executing each individual cat / gzcat gives correct answer.
gzcat /logs/1205* gzcat /logs/12052* cat /logs/12052 | egrep -v "XYZ|PQR"|wc -l
gzcat: gzcat.gz: No such file or directory
gzcat: cat.gz: No such... (2 Replies)
Discussion started by: vanand420
2 Replies
3. Shell Programming and Scripting
Hi all
Is there a way to read and process a gzip file line by line similar to a text file without using gzcat..
while processing a text file we will usually use the logic
exec<sample.txt
while read line
do
echo $line
done
Is there a similar way to process the gz file in the same... (4 Replies)
Discussion started by: aikhaman
4 Replies
4. Shell Programming and Scripting
Hi All,
I have a file "HOTEL_INFO.zip" and getting the below errors:
server1:/home/arun# gunzip -S .zip HOTEL_INFO.zip
gunzip: HOTEL_INFO.zip: first entry not deflated or stored -- use unzip
server1:/home/arun#unzip HOTEL_INFO.zip
ksh: unzip: not found.
... (11 Replies)
Discussion started by: Arunprasad
11 Replies
5. UNIX for Dummies Questions & Answers
I have a zip file as a.zip and it contains 1m xml files. like a1.xml, a2.xml....
The size is also very big nearly 1GB. I want to extract only a123.xml.
Can any one help how can I do this? (1 Reply)
Discussion started by: siba.s.nayak
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to list filenames instead of lines when i search in compresed files for a string.
#gzcat *.gz | grep -l 12345
gives me:
<stdin>
Anyone got a solution on this problem? (2 Replies)
Discussion started by: HugoH
2 Replies
7. Shell Programming and Scripting
Hi!!!
I am trying to grep a number in more then 1000 files which are .gz.
Below is the code :-
for i in `ls 20090618yz*_07.znf.gz`
do
a=`gzcat 20090618yz*_07.znf.gz | grep 9814843011`
if
then
echo $i
fi
done
My objective is to echo the file name also with the data.
... (3 Replies)
Discussion started by: tushar_tus
3 Replies
8. Shell Programming and Scripting
hi all,
I was able to do a script to gather a few files and sort them.
here it is:
#!/usr/bin/ksh
ls *mainFile* |cut -c20-21 | sort > temp
set -A line_array
i=0
file_name='temp'
while read file_line
do
line_array=${file_line}
let i=${i}+1 (5 Replies)
Discussion started by: naoseionome
5 Replies
9. Shell Programming and Scripting
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies
10. UNIX for Dummies Questions & Answers
Hi
can't unzip a gz file in TurboLinux 7.0
when i'm trying this
gunzip filename.tar.gz it always says not in gzip format
what should I do...please help me (4 Replies)
Discussion started by: CreamHarry
4 Replies