02-28-2007
sed not working
Hi,
Instead of changing F0<Number> to F<Number>
you can do a a replacement of FO with F
sed 's/FO/F/g' file.xml
if thats is not the requirement then we should be careful while using special characters
Regards,
Rakesh UV
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello experts,
I know line number of the word I want to replace. Can "sed" substitute word on a specific line?
As well, can sed substitute words inside a specific patten.
ex. <word>lalala</word> #replace anything between <word> and </word>
minifish (2 Replies)
Discussion started by: minifish
2 Replies
2. Shell Programming and Scripting
I have been lurking on this forum for some time now and appreciate Everyone's help. I need to find a way to get the SystemID from this XML file. The file is much larger than just this one line but I can grep and get this line Printed. But really just need the "systemid".
<test123: prefintem... (9 Replies)
Discussion started by: elbombillo
9 Replies
3. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
4. Shell Programming and Scripting
Hi Guys,
Req your help in searching and replacing the word that comes after equals(=) symbol
I would like to replace the sting in bold with a string in variable.
d=ABCDF8C44C22
# grep -i NIM_MASTERID ${_NIMINFO}
export NIM_MASTERID=00CDF8C44C00
I'm looking to replace any word that... (4 Replies)
Discussion started by: ajilesh
4 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
7. Shell Programming and Scripting
echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} |
awk 'gsub(/^|abc,|$/,"") {print}'
Required output
{grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies
8. Shell Programming and Scripting
SUSE linux
bash shell
this works
test -d /tmpp && echo "directory exists" || echo "directory doesn't exists" |sed -e "s/^/prefix /"
prefix directory doesn't exists
but why doesn't this work?
test -d /tmp && echo "directory exists" || echo "directory doesn't exists" |sed -e... (3 Replies)
Discussion started by: snoman1
3 Replies
LEARN ABOUT DEBIAN
std::basic_ostream_sentry
std::basic_ostream< _CharT, _Traits >::sentry(3cxx) std::basic_ostream< _CharT, _Traits >::sentry(3cxx)
NAME
std::basic_ostream< _CharT, _Traits >::sentry -
SYNOPSIS
Public Member Functions
sentry (basic_ostream< _CharT, _Traits > &__os)
~sentry ()
operator bool () const
Detailed Description
template<typename _CharT, typename _Traits>class std::basic_ostream< _CharT, _Traits >::sentry
Performs setup work for output streams.
Objects of this class are created before all of the standard inserters are run. It is responsible for exception-safe prefix and suffix
operations.
Definition at line 379 of file ostream.
Constructor & Destructor Documentation
template<typename _CharT, typename _Traits> std::basic_ostream< _CharT, _Traits >::sentry::sentry (basic_ostream< _CharT, _Traits > &__os)
[explicit]
The constructor performs preparatory work. Parameters:
os The output stream to guard.
If the stream state is good (os.good() is true), then if the stream is tied to another output stream, is.tie()->flush() is called to
synchronize the output sequences.
If the stream state is still good, then the sentry state becomes true (okay).
Definition at line 49 of file ostream.tcc.
References std::ios_base::failbit, std::basic_ios< _CharT, _Traits >::good(), std::basic_ios< _CharT, _Traits >::setstate(), and
std::basic_ios< _CharT, _Traits >::tie().
template<typename _CharT, typename _Traits> std::basic_ostream< _CharT, _Traits >::sentry::~sentry () [inline]
Possibly flushes the stream. If ios_base::unitbuf is set in os.flags(), and std::uncaught_exception() is true, the sentry destructor calls
flush() on the output stream.
Definition at line 407 of file ostream.
References std::ios_base::badbit, std::uncaught_exception(), and std::ios_base::unitbuf.
Member Function Documentation
template<typename _CharT, typename _Traits> std::basic_ostream< _CharT, _Traits >::sentry::operator bool () const [inline], [explicit]
Quick status checking. Returns:
The sentry state.
For ease of use, sentries may be converted to booleans. The return value is that of the sentry state (true == okay).
Definition at line 428 of file ostream.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
libstdc++ Tue Nov 27 2012 std::basic_ostream< _CharT, _Traits >::sentry(3cxx)