printing 'date' in unix -


the command echodate gives output : sun aug 20 08:14:50 2017. want date format in : aug 20. tried command : echodate|awk '{print $2, $3}', outputs want: aug 20

is there other method?

if date man page, you'll see it's quite capable of delivering want without passing output through textual filter - can use + specify output format, such as:

pax> date +"%b %d" aug 20 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -