Problem with AWK in AIX.


 
Thread Tools Search this Thread
Operating Systems AIX Problem with AWK in AIX.
# 1  
Old 12-15-2008
Problem with AWK in AIX.

The below line works fine in Linux but it throws error on AIX

for col in `cat $format_file | awk 'BEGIN {FS=","} {print $1}'`

The exact error is like this

Syntax Error The source line is 5.
The error context is
printf "%s%s", $a[i], >>> i== <<<
awk: 0602-502 The statement cannot be correctly parsed. The source line is 5.


Can any one help me out?
# 2  
Old 12-15-2008
This is not the line why the error occurs and the line you showed works on AIX.
# 3  
Old 12-15-2008
I don't think you gave us the entire awk script. At any rate, if you have "$a[i]", you probably want just "a[i]".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Ssh problem on AIX 5.3

Hello, I have a weird ssh problem from host A to host B. Both hosts A and B running AIX 5.3. if host-A has no ~/.ssh/id_rsa.pub & ~/.ssh/id_rsa then it works fine. If I connect from host-A to host-B (as root user) ssh host-B it asks for root password and allows me to get remote root prompt upon... (0 Replies)
Discussion started by: reddyr
0 Replies

2. AIX

AIX 7.1 screen problem

I am certain I have seen a thread for this somewhere but cannot remember where. The problem is for example when in smitty when all fields have been populated and return has been selected the screen clears and then returns with corruption. Also when using the more pipe once the end is reached or... (3 Replies)
Discussion started by: johnf
3 Replies

3. AIX

NIS problem in aix

Hi, We are facing a problem with nis . we have a master server and there are 5 -6 slave servers configured with NIS. All the servers are IBM aix with different O/s versions installed Ex.5.2, 5.3 and 6.1 The master nis server is a 5.2 aix server system and all others are installed with nis... (6 Replies)
Discussion started by: ramkalluri
6 Replies

4. Shell Programming and Scripting

Problem with awk awk: program limit exceeded: sprintf buffer size=1020

Hi I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it The code is that: { if (NF==17){ print $0 }else{ fields=NF; all=$0; while... (2 Replies)
Discussion started by: fate
2 Replies

5. AIX

AIX OS problem? network problem?

Dear ALL. I installed AIX OS on customer sites. but Only one site is too slow when I connected telnet, ftp.. Ping is too fast. but telnet and FTP is not connected.. of course i check the configuration file on aix but it's normal. Do any Idea?? thanks in advance. - Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies

6. Shell Programming and Scripting

Awk problem: How to express the single quote(') by using awk print function

Actually I got a list of file end with *.txt I want to use the same command apply to all the *.txt Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics. For example: I got the file below: file1.txt file2.txt file3.txt... (4 Replies)
Discussion started by: patrick87
4 Replies

7. AIX

Problem in SIGTTOU in AIX 5.2

Hi All, I searched different websites through search engine to get my problem rectified but it went in vain. I thought let me post my issue under expert category Whenever I run any script in background like <script name> & I get the following result if I use jobs command +... (3 Replies)
Discussion started by: shahnazurs
3 Replies

8. AIX

aix printing problem

i had small problem but the less of experience prevent me from solving it i added new print queue and device to aix 5.1 system and it works ok except that if i tried to print an arabic document it returns dummy data that can't be read there are alot of queues and all works fine with arabic... (0 Replies)
Discussion started by: aboharb17
0 Replies

9. UNIX for Advanced & Expert Users

AIX 5.2 problem

Hello, I'm working on a AIX5.2 OS. The problem i'm facing is that the system performance is good in rrot login, but when i switch to other users login it is very slow. A ls or even pwd command take almost 20 to 30 sec to disply output. The same logins are working fine on other... (2 Replies)
Discussion started by: pradeepmacha
2 Replies

10. AIX

AIX pg problem

Hi all, I have problem with regards to using pg on AIX v5.3.0.0 . Here wht i am trying to do --- i have shell script with the following statements if || then echo ^[[?3h tput clear pg -f $1$2 echo ^[[?3l ... (0 Replies)
Discussion started by: ramanujapuram
0 Replies
Login or Register to Ask a Question