gnu

I‘m trying to match words using GNU awk command and getting the following error:

echo 'foo bar this that blah' | awk '{gsub("\<regex-word\>", "NEW-WORD");print}'

But getting the following warning on screen and it is not working:
awk: warning: escape sequence `\<' treated as plain `<'
awk: warning: escape sequence `\>' treated as plain `>'

How do I fix this problem under Unix like operating systems?

{ 0 comments }

How do I truncate a UNIX binary log file using command line options?

{ 0 comments }

In Unix or Linux operating systems, how do I move file(s) starting with a dash (e.g., /home/you/–filename.txt or /home/you/-filename.txt)?

{ 13 comments }

I know how to open .chm files under Linux, but how do you open and view .CHM files under Apple Mac OS X?

{ 4 comments }

How can I remove the ^M or ^M (carriage Return / line feed ) from text file using sed under UNIX or Linux operating systems?

{ 15 comments }

Can you explain me usage of nullglob variable under BASH? How do I check for any *.c files in any directory?

{ 6 comments }

I‘d like to match all filename like foo.c, FOO.C, fOO.c, Foo.C and so on using find command under UNIX. How do I do a case-insensitive find search under Sun Solaris / OpenSolaris UNIX systems?

{ 1 comment }