Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-14-2012
Registered User
 
Join Date: Dec 2006
Posts: 496
Thanks: 264
Thanked 1 Time in 1 Post
Getting rid of abnormal Characters

i'm grepping for words in the /var/adm/messages (sun solaris).

but it looks like while my grepping finds the strings, when it outputs them out, the beginning of some lines are chopped off.


Code:
Jun 13 14:06:02 sky.net ufs: [ID 845546 kern.notice] NOTICE: alloc: /prod: file system full
3 14:39:19 sky.net ufs: [ID 845546 kern.notice] NOTICE: alloc: /prod: file system full
Jun 13 14:46:00 sky.net ufs: [ID 845546 kern.notice] NOTICE: alloc: /prod: file system full
Jun 13 14:52:41 sky.net ufs: [ID 845546 kern.notice] NOTICE: alloc: /prod: file system full
Jun 13 14:59:19 sky.net ufs: [ID 845546 kern.notice] NOTICE: alloc: /prod: file system full

command i'm running:


Code:
{ sed "/^Jun 13 14:06/!d;q" ; cat ;} < /var/adm/messages | egrep "prod:" | egrep "file system full"

i've ran it with the tr command, but all to no avail:


Code:
{ sed "/^Jun 13 14:06/!d;q" ; cat ;} < /var/adm/messages | egrep "prod:" | egrep "file system full" | tr -d '\015\032'

Sponsored Links
    #2  
Old 06-14-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,374
Thanks: 491
Thanked 2,535 Times in 2,418 Posts
Run some of the bad lines through hexdump -C so we can see what's actually going wrong with them please.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Getting rid of abnormal Characters SkySmart Shell Programming and Scripting 4 01-11-2012 09:05 PM
Abnormal behaviour of Defuncts reddybs UNIX for Advanced & Expert Users 1 05-16-2009 06:55 AM
abnormal process HPUX tomjones HP-UX 4 04-02-2009 06:17 AM
Abnormal Inact Memory jipznet1981 Filesystems, Disks and Memory 0 06-22-2006 03:01 PM
Abnormal Termination errors bialsibub UNIX for Dummies Questions & Answers 2 11-14-2001 10:21 AM



All times are GMT -4. The time now is 01:20 AM.