GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: error message with awk
Operating System - HP-UX
1846167
Members
3446
Online
110254
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2005 06:51 PM
07-19-2005 06:51 PM
error message with awk
#awk 'FS=","{if ($4!=0) print $1,$5,$51,$52,$53,$54}' /tmp/1.txt
-------
Error msg
-------
awk: Input line 99783,0,3,249,ATC_au cannot be longer than 3,000 bytes.
The input line number is 686. The file is /tmp/1.txt.
The source line number is 1.
=====
How to solve the problem
Thanks
-------
Error msg
-------
awk: Input line 99783,0,3,249,ATC_au cannot be longer than 3,000 bytes.
The input line number is 686. The file is /tmp/1.txt.
The source line number is 1.
=====
How to solve the problem
Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2005 06:59 PM
07-19-2005 06:59 PM
Re: error message with awk
Hi,
Is the lines (records) in the file not separated with newlines ? If not, you must also set the RS parameter in the BEGIN statement.
Is the lines (records) in the file not separated with newlines ? If not, you must also set the RS parameter in the BEGIN statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2005 07:39 PM
07-19-2005 07:39 PM
Re: error message with awk
Well, the message seems very clear.
(What part of "cannot be longer than 3,000 bytes do you not understand? :-)
Is that line 686 longer than 3000 bytes?
And is that length indeed as expected?
Get a better awk? See for example:
http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=53114
Use perl?
Untested:
perl -ne '@words=split(/,/); print join(',',@words[0,4,50..53])."\n" if @words[3]' /tmp/1.txt
hth,
Hein.
(What part of "cannot be longer than 3,000 bytes do you not understand? :-)
Is that line 686 longer than 3000 bytes?
And is that length indeed as expected?
Get a better awk? See for example:
http://forums2.itrc.hp.com/service/forums/questionanswer.do?threadId=53114
Use perl?
Untested:
perl -ne '@words=split(/,/); print join(',',@words[0,4,50..53])."\n" if @words[3]' /tmp/1.txt
hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2005 08:03 PM
07-19-2005 08:03 PM
Re: error message with awk
Hein is given answer with perl. Anyway we can try with cut (I hope). ?
while read line;
do
if [[ $(echo $line|cut -d',' -f4) != "" ]]
then
echo "$(echo $line|cut -d',' -f1,5,51-54)"
fi
done < /tmp/1.txt
P.S: Not checked. Pls give example you have tried.
hth
while read line;
do
if [[ $(echo $line|cut -d',' -f4) != "" ]]
then
echo "$(echo $line|cut -d',' -f1,5,51-54)"
fi
done < /tmp/1.txt
P.S: Not checked. Pls give example you have tried.
hth
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP