The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
bunch of questions gentox Shell Programming and Scripting 6 07-01-2008 04:34 AM
How do I rename a bunch of files at once? bbbngowc UNIX for Dummies Questions & Answers 8 04-21-2008 10:23 AM
Bunch of questions... Legend986 UNIX for Dummies Questions & Answers 3 09-28-2007 09:33 PM
batch file--bunch of commands alfredo123 Windows & DOS: Issues & Discussions 3 07-18-2007 12:05 PM
what a bunch of idiots... norsk hedensk News, Links, Events and Announcements 1 01-15-2004 11:45 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2009
unclecameron unclecameron is offline VIP Member  
VIP Member
  
 

Join Date: Nov 2008
Posts: 37
bunch of ^@^@^@^@^@^@^@^@'s in bash log file

I have a bash script that has been running fine for months that scans a bunch of files and gives me a log file output, it has suddenly started putting 1.5M of a repeating sequence of ^@^@^@^@^@^@^@^@^@^@ on the first line of the logfile, is this a unicode problem I should be setting something in my bash script? I already had PATH issues after awhile of running (that I solved with your help, thanks!). Any suggestions?
  #2 (permalink)  
Old 10-23-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380

Find the problem in your script and fix it.
  #3 (permalink)  
Old 10-23-2009
unclecameron unclecameron is offline VIP Member  
VIP Member
  
 

Join Date: Nov 2008
Posts: 37
um, thanks?
  #4 (permalink)  
Old 10-23-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,972
Where do you see those characters? When you look at the file using vi/vim? If so, '^@' (one character, not two) is the representation of the NULL-byte. Example of this happening is when you truncate a file while there's still an open file-handle.
  #5 (permalink)  
Old 10-23-2009
unclecameron unclecameron is offline VIP Member  
VIP Member
  
 

Join Date: Nov 2008
Posts: 37
It's an extremely long sequence of those 2 characters with no spaces between the 2 character pattern, only on the first line of the file when viewing with either vi or cat, it's almost like I'm not cleaning up from the last time I ran the script or something? I can't understand why it ran once a day for months and just now started doing this. The script takes >20 hours to run once.
  #6 (permalink)  
Old 10-23-2009
scottn scottn is online now Forum Advisor  
VIP Member
  
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,134
This is usually the case in VI when the line is "too long", or? (seen it on AIX, Solaris - but tried it on Linux, and that doesn't happen somehow!)
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0