Awk cannot handle more than 30 files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Awk cannot handle more than 30 files
# 1  
Old 10-18-2008
Awk cannot handle more than 30 files

I trying to search for lines with multiple search criterias in an archive of zipped files. But awk seems to have a limit.

Any idea how to fix it?

I'm on a sun solaris system.

Here is my search string:

gzcat -r *200808* | awk -v 'substr($0,50,11)=="11095512309" || substr($0,50,11)=="11090976301" && substr($0,143,4)=="TEST" {print $0}'
# 2  
Old 10-18-2008
Use nawk on Solaris and see what you get.
# 3  
Old 10-19-2008
nawk seems to work in a different way, it ask for a program, i dont get how it work from the man page
# 4  
Old 10-20-2008
Why are you using -v option, its not required in this case, try this:
Code:
gzcat -r *200808* | xargs nawk 'substr($0,50,11)=="11095512309" || substr($0,50,11)=="11090976301" && substr($0,143,4)=="TEST" {print $0}'

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Handle special characters in awk -F

Hello Folks, Need to bisect strings based on a subset. Below works good. echo /a/b/c/d | awk -F"/c/d$" '{print $1}' /a/b However, it goes awry with special characters. echo /a/b/c+/d | awk -F"/c+/d$" '{print $1}' /a/b/c+/d Desired output: /a/b Escaping the special characters... (11 Replies)
Discussion started by: vibhor_agarwali
11 Replies

2. Shell Programming and Scripting

Handle null values-awk

I am using below code to validate the source file,code working fine but if any column contains null value then below code throwing error actually it should not.how to customize the below code to handle null null values also. When I run the script with below source data getting “date error”, as... (2 Replies)
Discussion started by: srivalli
2 Replies

3. Shell Programming and Scripting

~R in between string, how to handle in AWK

Hi, Can any one help how to handle the below situation. Am using Awk script to handle variable When I open the file in VI mode, I see the string as Orange~Rs , but when I cat the file its showing as plain Oranges. When I copied the file over to Windows, am seeing the special character... (3 Replies)
Discussion started by: sp999
3 Replies

4. Shell Programming and Scripting

AWK/SED: handle max chars in a line

Hi all, I hope you guys can help me. I prefer SED/AWK solutions if possible. For my shame it didn't work for me :o ISSUE: :wall: 1\3 1/$4\@7\ 1234567890123456789\ 1234567890123456789,\ 1234567890123456789\ 123456789012 12345 1234567890123456789\ 1234567890123456789,\ 1234... (5 Replies)
Discussion started by: unknown7
5 Replies

5. UNIX for Advanced & Expert Users

How to handle files in use during Tar?

How you do usually deal with files in use during a backup? Is there a option to let TAR skip opened files? Or notify me an opened file is tar'ed? What's the best practice? Thanks (3 Replies)
Discussion started by: overmindxp
3 Replies

6. Shell Programming and Scripting

how to handle , in data where separator also commas in awk script

TEST_HEME,"SubNetwork=ONRM_RootMoR,SubNetwork=ARNC1",CELL when I split by FS="," then $0=TEST_HEME $1="SubNetwork=ONRM_RootMoR $2=SubNetwork=ARNC1" but I need this will be single value "SubNetwork=ONRM_RootMoR,SubNetwork=ARNC1" (4 Replies)
Discussion started by: Hemendra
4 Replies

7. UNIX for Dummies Questions & Answers

Grep alternative to handle large numbers of files

I am looking for a file with 'MCR0000000716214' in it. I tried the following command: grep MCR0000000716214 * The problem is that the folder I am searching in has over 87000 files and I am getting the following: bash: /bin/grep: Arg list too long Is there any command I can use that can... (6 Replies)
Discussion started by: runnerpaul
6 Replies

8. Shell Programming and Scripting

[Beginner] Handle Files

Hi, How can I check if a text files is empty? (With Bash Shell) (5 Replies)
Discussion started by: DNAx86
5 Replies

9. Shell Programming and Scripting

FTP - To handle error while transferring files

Hi, I had written an FTP script where in I loop through the directories and transfer the files from each and every directory of Windows to UNIX. Now the problem is when 1. The connection is unable to be established I should return some error codes 2. When there is some system... (1 Reply)
Discussion started by: mahalakshmi
1 Replies

10. UNIX for Dummies Questions & Answers

Can solaris's Zip/Unzip handle Winzip Version 10.0 Files?

I understand that this version of Winzip allows 129-bit AES encryption and passwords. Can Solaris handle that yet? (2 Replies)
Discussion started by: BCarlson
2 Replies
Login or Register to Ask a Question