The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Sed-Special character replacement usshell Shell Programming and Scripting 3 05-22-2008 10:06 AM
sed and special character in data MizzGail Shell Programming and Scripting 3 01-23-2008 03:45 PM
convert special character like £ cynnie Shell Programming and Scripting 1 08-08-2007 06:37 AM
Special character in my file Ryan2786 UNIX for Dummies Questions & Answers 3 07-05-2007 11:35 PM
special character ? mile1982 High Level Programming 1 10-19-2004 08:15 AM

Closed Thread
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 01-05-2009
tostay2003 tostay2003 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
special character

Hi,

I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately.
Code:

a) What does this below character means?
b) How can i remove it,
I already have
Code:
sed '/^$/d'
c) Will this effect the file by any means (If I am guessing properly, this is the eof notation)

Thanks for help
  #2 (permalink)  
Old 01-05-2009
tostay2003 tostay2003 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
I tried to edit the post and the character went away.

here is the character

Code:

  #3 (permalink)  
Old 01-06-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by tostay2003 View Post
I tried to edit the post and the character went away.

here is the character

Code:


There is still no character in your post. Please run the character through od, hexdump or other character converter and post it in hex or octal format.
  #4 (permalink)  
Old 01-06-2009
tostay2003 tostay2003 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 23
Code:
0000000  \f  \n  \f  \n  \f  \n  \f  \n  \f  \n  \f  \n  \f  \n  \f  \n
0000020  \f  \n  \f  \n
0000024
I got the following with
Code:
od -c
The below code isn't removing it, or may be leaving out the newline characters
Code:
tr -d "\f"
The below sed statement is deleting the complete data
Code:
sed 's[ \t]*\f[ \t]*//g' | sed '/^$/d'

Last edited by tostay2003; 01-06-2009 at 12:13 PM..
  #5 (permalink)  
Old 01-06-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361
Quote:
Originally Posted by tostay2003 View Post
Code:
tr -d "\f"

That works for me. try:

Code:
tr -d "\014"
Closed Thread

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 03:30 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