The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-17-2004
zazzybob's Avatar
zazzybob zazzybob is offline
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
The message is giving you a clue here. Is there any line in any file under /vob/project that contains a line longer than 2048 chars, which is a limit for some Unix commands?

Try this to count the length of lines in your files
Code:
#!/bin/sh

for file in "$@"; do
  echo -e "\nFILE: $file"
  awk '{printf( "%5d: %s\n", length( $0 ), $0 ) }' $file
done
Save this as linelength.sh, make it executable, and run it as
$ linelength /vob/project/*

Cheers
ZB
Reply With Quote