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
To remove new line character shihabvk UNIX for Advanced & Expert Users 7 06-18-2009 07:44 AM
Remove last character of a term Raynon Shell Programming and Scripting 6 03-20-2008 06:04 AM
How to remove extraneous character vsmurali UNIX for Dummies Questions & Answers 7 03-18-2008 12:57 PM
Script to Remove Garbage Character Eddie_The_Head Shell Programming and Scripting 4 03-28-2006 05:09 AM
Remove Last Character of Line danhodges99 Shell Programming and Scripting 4 05-21-2003 09:30 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-29-2008
manishabh manishabh is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 9
Post sed to remove character ['

I have a huge file where the each column has data in the format:

['680.431504394305'] ['P'] . I want to remove the [' and '] from each value. How do I do it with sed?

thanks
  #2 (permalink)  
Old 08-29-2008
danmero danmero is online now Forum Advisor  
  
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 1,367
What about:
Code:
tr -d "[']" < file
  #3 (permalink)  
Old 08-29-2008
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,382
sed -e 's/\[//g;s/\]//g' filename
Sponsored Links
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 12:35 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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