July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Solaris Grep

grep on Solaris

Today I was asked by a colleague how to match a regex in a text file and return a specific number of lines both before and after the match. GNU grep has a very easy solution for this; the -A/B/C flags, as shown on my […]

Format date for display or to use in a shell script

Q. How do I format date to display on screen on for my scripts as per my requirements? A. You need to use standard date command to format date or time for output or to use in a shell script.

 

Syntax to specify formatdate +FORMAT Task: Display date in mm-dd-yy formatType the command as […]