help-ksh as cronjob, line too long


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help-ksh as cronjob, line too long
# 15  
Old 12-14-2011
Quote:
Originally Posted by themroc
Hello ahamed,

thx so far, but since i'm not so familiar with awk syntax i can just send the errormessage, 'set -x' does not offer more than ...:
Code:
...
END{myprint()}  /opt/scripts/NA04913772/a1.log
awk: syntax error near line 2
awk: bailing out near line 2

Use nawk or /usr/xpg4/bin/awk on Solaris.
This User Gave Thanks to Franklin52 For This Post:
# 16  
Old 12-14-2011
YES!!!
using nawk instead of awk and adding some bytes to the code of ahamed solves my problem...:
Code:
...
END{myprint()} ' $LOGFILE1 >> $LOGFILE3

Logfile 1 :
Code:
Date              Id     Device            Component         Type
----------------- ------ ----------------- ----------------- -----------------
2011-07-15        404869 blnace302-ST6140_ Tray.85.PowerSupp Problem
10:20:27                 2-1247769116      ly.A
                         (StorageTek 6140)
2011-07-15        404872 blnace302-ST6140_ Tray.85.PowerSupp ProblemClearEvent
10:25:27                 2-1247769116      ly.A
                         (StorageTek 6140)

Logfile 3 :
Code:
 2011-07-15 10:20:27  404869  blnace302-ST6140_2-1247769116(StorageTek 6140) Tray.85.PowerSupply.A Problem
 2011-07-15 10:25:27  404872  blnace302-ST6140_2-1247769116(StorageTek 6140) Tray.85.PowerSupply.A ProblemClearEvent

thx to all for your patience and for your support!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh script throwing arg list too long for mv cp wc - everything

i have a ksh script which internally calls another ksh script. this inner script has simple commands like shown in the code window. In the script im trying to do a mv - it fails with arg list too long. then i try to perform cp and cat - and both are failing with similar error. :wall: How is... (4 Replies)
Discussion started by: nyc68
4 Replies

2. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

3. AIX

aix:ksh: /usr/bin/rm: 0403-027 The parameter list is too long.

Hi, I am getting the below error message When i am trying to delete the files from the directory.Could you please guide me? rm *.aud ksh: /usr/bin/rm: 0403-027 The parameter list is too long. and find /oracle/admin/testP/adump/*.aud -mtime +5 -exec rm {} \; ksh: /usr/bin/find:... (3 Replies)
Discussion started by: nokiae63
3 Replies

4. UNIX for Dummies Questions & Answers

vi : Line too Long Error

Hi ! I am woking on Solaris 5.10 and face a problem sometimes when i try to open files in the vi editor . Sometime when the file is big i am not able to view the file in vi and i get the error like I guess vi have some line size setting and if the lines are ,longer than that... (4 Replies)
Discussion started by: Paarth
4 Replies

5. UNIX for Dummies Questions & Answers

grep long line

I am trying to get the count of a word from an xml using the below command grep "search word" -c test.xml The result is only 1, because my xml contains only one line (hule line- several thousand characters). I guess grep command will process for only 128 characters for each line. ... (7 Replies)
Discussion started by: venky23
7 Replies

6. UNIX for Advanced & Expert Users

help on ksh and sql..getting error as is too long. maximum size is 240 characters."

Hi, In my script i am executing sql file and there are some variables in SQL files which are assigned at run time. one of the variable value is having more than 240 characters and at time of execution its getting failed with error as "is too long. maximum size is 240 characters." ... (1 Reply)
Discussion started by: pooga17
1 Replies

7. UNIX for Dummies Questions & Answers

vi.....line too long

I'm getting a "line too long" error when I try to vi a particular file. I really just need to view the contents as I don't have to change anything. Any suggestions?? I already tried to cat but it didnt work........:( (7 Replies)
Discussion started by: shorty
7 Replies

8. Shell Programming and Scripting

search a long line

Hey all, I need to retrieve something from a line, say <TEST><A>123</A><B>456</B><ID>1111</ID><C>789</C><D>000</D></TEST><TEST><A>123</A><B>456</B><ID>2222</ID><C>789</C><D>000</D></TEST> I need to match <ID>111</ID>, so I want to retrieve <ID>1111</ID><C>789</C><D>000</D></TEST> is... (14 Replies)
Discussion started by: mpang_
14 Replies

9. UNIX for Dummies Questions & Answers

ksh: /usr/bin/ls: arg list too long

I am using IBM AIX unix version 4.3.3.0. In a directory there are many files with different patterns. When I am trying to execute the command, ls -l with the file pattern, which have fewer files it gives the desired result. However when I am trying to execute the same command for file pattern,... (2 Replies)
Discussion started by: jitindrabappa
2 Replies

10. Shell Programming and Scripting

ksh: /bin/grep: arg list too long

when i run the command below in a directory which contains too many files i got the error: ksh: /bin/grep: arg list too long ls|grep AA*B* how can i handle this problem? (5 Replies)
Discussion started by: gfhgfnhhn
5 Replies
Login or Register to Ask a Question