473,387 Members | 1,897 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to delete [*] from each line ?

4
I have a file with thousands of lines like
[*] name1, email1
[*] name2, email2
[*] name3, emai3

I want to delete all.[*]
please help me with any command, unix, perl, python
thanks
Mar 30 '13 #1

✓ answered by Luuk

Expand|Select|Wrap|Line Numbers
  1. sed 's/\[[*\]]//g' filename

1 1505
Luuk
1,047 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. sed 's/\[[*\]]//g' filename
Apr 1 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Kenneth | last post by:
I have a flat file on the server which I append to from a HTML web form. I need to delete the last line of the flat file before I append though. How do i do that? I have the following code. ...
4
by: Tor Erik Sønvisen | last post by:
Hi How can I read the first line of a file and then delete this line, so that line 2 is line 1 on next read? regards
8
by: Dong Ge | last post by:
Hi! I am a beginner of C. I want to delete some characters or a whole line in a text file. I have tried the "fprintf", "fputs", "fwrite", but no one of them can run rightly. In the below...
21
by: Zytan | last post by:
Instead of Ctrl+Y redoing what's stored in 'future history', it REPLACES that information (which will then be forever lost) with a new command: delete current line. This shortcut is so ridiculous...
1
by: shivapadma | last post by:
hello, can we do the below steps to delete a line from a file in c 1:first the lines in the files other than the desired line which has to be deleted are copied to the other...
4
by: jeepers | last post by:
Hi all, my problem is delete a line in a text file. the file contain -n line with user, userCode. i want to replace the line with user is egual at user, and/or insert new line but delete the...
1
by: Edwin.Madari | last post by:
running this snippet, is blanking out ^abdc$.. what is the issue ? abcd efg hijk lmn $ efg hijk lmn
17
by: vijayarl | last post by:
Hi All, Requirement: i have 4 excel files, each file will have this line 18/01/2008 20:00:00 5.31 5.48 5.33 i need to search for this line & extract this line then print it another...
2
by: briggs | last post by:
Hi All, I have a file which the following data This is a sample tool error end of file I need to delete the line before tool error. I can read the file line by line and match for the key...
1
by: amskape | last post by:
Hi Friends, I need a PHP script to delete a line with certain pattern from all files in a directory. The Directory contain files with extensions .js,.html and .php. Do any body give a working code...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.