The following will work with the data sample you provided. However, it will not work with comments that span multiple lines. If you need something more complicated, you might want to look into using a tool that's familiar with the language in question.
Regards,
Alister
Alister, you're amazing.
Can you do me one more favor and explain the syntax to me so I'll know for next time?
How to use sed to remove html tags including text between them?
Example: User <b> rolvak </b> is stupid. It does not using <b>OOP</b>!
and should output: User is stupid. It does not using !
Thank you.. (2 Replies)
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
I am trying to remove the ita from this file:
"1234ita","john","smith"
"56789ita","jim","thomas"
the command i am using is:
sed '/^ita/d' infile.csv > outfile.csv
it is running but doing nothing, very rarely use sed so trying to learn it any help would be appreciated (2 Replies)
what is the sed command to remove the first two characters of every line of a text file?
each line of the text file has the same amount of characters, and they are ALL NUMERIC. there are hundreds of lines though.
for example,
>cat file1.txt
10081551
10081599
10082234
10082259
20081134... (20 Replies)
I have a large CSV files (e.g. 2 million records) and am hoping to do one of two things. I have been trying to use awk and sed but am a newbie and can't figure out how to get it to work. Any help you could offer would be greatly appreciated - I'm stuck trying to remove the colon and wildcards in... (6 Replies)
I want to remove text from nth position to nth position couple of times in same line
my line is
"hello is there anyone can help me with this question"
I need like this
ello is there anyone can help me with question
'h' is removed and 'this' removed from the line. I want to do this... (5 Replies)
I have test.xml XML file like
<Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text ">
<Session ......rest of xml...............
I need output like
<Report>
<Session ......rest of... (3 Replies)
Hi there, my first post, so you might find my noobness ;)
I need help to fix a thing,
find /mnt/fs01/gfx/ -iname "*.rar" > gfx.txt
Gives this contained textfile:
/mnt/fs01/gfx/toba/toba.rar
/mnt/fs01/gfx/zeta/zimba.rar
/mnt/fs01/gfx/brashe/getha.rar
And now the tricky part (for... (3 Replies)
Trying to use sed to, in-place, remove specific text from a file. Since there are / in the text I use | to escape that character. Thank you :).
sed -i -e 's|xxxx://www.xxx.com/xx/xx/xxx/.*/|' /home/cmccabe/list
sed: -e expression #1, char 51: unterminated `s' command (4 Replies)
Hello,
I could not remove brackets with text contents
myfile:
Please remove the bracket with text
I wish to remove:
I tried:
sed 's/\//' myfile
It gives:
Please remove the bracket with text A1
I expect:
Please remove the bracket with text
Many thanks
Boris (2 Replies)
Discussion started by: baris35
2 Replies
LEARN ABOUT DEBIAN
smart
smart(8)smart(8)NAME
smart - The Smart Package Manager
SYNOPSIS
smart command [options] [arguments]
DESCRIPTION
The Smart Package Manager project has the ambitious objective of creating smart and portable algorithms for solving adequately the problem
of managing software upgrading and installation. This tool works in all major distributions, and will bring notable advantages over native
tools currently in use (APT, APT-RPM, YUM, URPMI, etc).
Action commands
update
install
reinstall
upgrade
remove
check
fix
download
clean
Setup commands
channel
priority
mirror
flag
Query commands
search
query
info
stats
Run "smart command --help" for more information.
Options--version
Show program's version number and exit
--config-file=FILE
Configuration file (default is <data-dir>/config)
--data-dir=DIR
Specifies the config file location - can take http, ftp urls and local file Data directory (default is /var/lib/smart/)
--log-level=LEVEL
Set the log level to level (debug, info, warning, error)
--gui Use the default graphic interface
--shell
Use the default shell interface
--interface=NAME
Use the given interface
--ignore-locks
Don't respect locking
-o OPT, --option=OPT
Set the option given by a name=value pair
Examples
smart install --help
smart install pkgname
smart --gui
smart --gui install pkgname
smart --shell
FILES
/etc/smart/
/var/lib/smart/
/usr/lib/smart/
/usr/lib/smart/plugins/
SEE ALSO
http://labix.org/smart
AUTHOR
Gustavo Niemeyer <gustavo@niemeyer.net>
Christoph Thiel 2006 Jun 16 smart(8)