Good day to all. There is a line containing this:

/usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:581:69: note: template<class _CharT, class _Traits, class _Tp> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:528:77: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*) /usr/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/ostream:523:75: note: template<class _Traits>

How can I delete the entire path to the file, leaving only his name? Thank.

  • I did not see an array here. - ichbinkubik
  • oops) this is in line. - niXman

1 answer 1

Replacement operator (in perl, in php, db. Also, in sed it is necessary to adjust): s/^([^:]+)\/// . Removes from the beginning of the line everything not: ending with /