LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-04-2009, 07:15 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
deleting from a file


hi i am trying to delete these symbols "[ ]" from a file but it says string not found
i tried
:%s/[//g while editing the file not working also tried
sed -e '/\[/d' and sed '/]/d' still no job
can anyone help
 
Old 08-04-2009, 07:23 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware and Debian
Posts: 514

Rep: Reputation: 108Reputation: 108
$ echo "[]" | sed 's/\[\]//'

works here
 
Old 08-04-2009, 07:28 AM   #3
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
there are record within them like
[12243] and i want to get them of
 
Old 08-04-2009, 07:30 AM   #4
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
sorry ma bad it works thats
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting lines from a file horacioemilio Programming 16 12-18-2007 07:07 PM
filtering a file then deleting it. road69runners Programming 6 12-02-2004 02:54 PM
Deleting a file starting with a ? bitpicker Linux - General 6 11-24-2004 02:20 PM
deleting a file intellscreen Linux - Newbie 3 11-02-2003 01:39 PM
Deleting a file...... lucifer Linux - Software 0 09-03-2002 04:36 AM


All times are GMT -5. The time now is 12:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration