10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have big files (some are >300GB!) that need substitution for some patterns, for example, change Multiple Spaces into Tab. I used this oneliner:sed '1,18s/ \{1,\}/\t/g' infile_big.sam > outfile_big.sambut it seems very slow as the job is still running after 24 hours! In this example, only the... (8 Replies)
Discussion started by: yifangt
8 Replies
2. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
3. Shell Programming and Scripting
I was searching for parsing a log file and found what I need in this link
http://stackoverflow.com/questions/7575267/extract-data-from-log-file-in-specified-range-of-time
But the most useful answer (posted by @Kent):
# this variable you could customize, important is convert to seconds.
# e.g... (2 Replies)
Discussion started by: kingk110
2 Replies
4. Shell Programming and Scripting
Hi all,
on Solaris 10, I'd like to print a range of lines starting at pattern but also including the very first line before pattern.
the following doesn't print the range starting at pattern and going down to the end of file: cat <my file> | sed -n -e '/<pattern>{x;p;}/'
I need to include the... (1 Reply)
Discussion started by: siriche
1 Replies
5. Programming
hi Experts
just wondering if you can help me check a number between a specific range
if i have an ip address , how can i say the valid number for ip between 1 to 254
something like this
if ($ip ) =~ /.../
{
}
what the pattern i need to type
thanks (3 Replies)
Discussion started by: doubando
3 Replies
6. Shell Programming and Scripting
Hi Everyone!
I really appreciate all of your help, I'm learning so much, can't wait until I get good enough to start answering questions!
I have a problem ... from one large file, I'd like to create multiple new files for each pattern block
beginning with /^ISA/
ending with /^IEA/
... (2 Replies)
Discussion started by: verge
2 Replies
7. Shell Programming and Scripting
Hello,
I have a file ( say file1) which has lines like below.
xxxx:xxxx,yyyy,1234,efgh
zzzz:zzzz,kkkk,pppp,1234,xxxx,uuuu,oooo
dddd:dddd
here the word before ":" ( ie: xxxx) is the file name and the string after : are also file names, but each file name separated by ","
In case of... (20 Replies)
Discussion started by: pradeepmacha
20 Replies
8. Shell Programming and Scripting
Hi Everyone,
a.txt
1272904667;1272904737;1
1272904747;1272904819;1
1272904810;1272904857;1
1272904889;1272904926;1
1272905399;1272905406;1
1272905411;1272905422;1
if i want to get the record, when the a.txt 1st field is between 1272904749 and 1272905399, any simple way by using awk,... (1 Reply)
Discussion started by: jimmy_y
1 Replies
9. Shell Programming and Scripting
I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated.
e.g.
Pattern1
Bombay
Calcutta
Delhi
Pattern2
Pattern1
Patna
Madras
Gwalior
Delhi
Pattern2
Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies
10. Shell Programming and Scripting
I am reading a file that contains over 5000 lines and I want to assign it to a shell variable array (which has a restriction of 1024 rows). I had an idea that if I could grab 1000 record hunks of the file, and pipe the records out, that I could perform a loop until I got to the end and process 1000... (5 Replies)
Discussion started by: beilstwh
5 Replies