Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Tuesday, September 13, 2011

Show non-printable characters in VI

You just KNOW there's a stray tab or other character in this file, right? So how can you display these characters in vi?

[ESC] to get into command mode
:set list

Look through the file. Tabs will be ^I, DOS-style end-of-lines will be ^M, etc.

To go back:
[ESC] to get into command mode
:set nolist

Friday, February 4, 2011

Read File using Unix Shell

This is something really small which could be useful in case you want to read a comma separated file and use each line (on this case to call an external program passing as parameter each field value)

Wednesday, October 15, 2008

findstr a Windows alternative to grep

If you've been using grep all week only to come home to an PC running Windows, you're probably missing a part of your life when you leave your Linux workstation. If you're on a text file containing huge amounts of text, such as a log file you can get findstr to search for all lines with a particular word. Findstr does regular expressions too. It's got many of the options that grep does - printing filenames for matches, printing lines that do not match, and multiple file search. For more reference, you can take a look to the official documentation or here