Shell cmd “date” without new line in the end

No there isn’t. You need another command like echo -n, printf or tr. You could put a script somewhere in your PATH (eg. /usr/bin/) and make it executable with chmod +x /usr/bin/mydate

script:

#!/bin/sh
echo -n `date +"[%m-%d %H:%M:%S]"`

or use an alias.

alias mydate="echo -n `date +"[%m-%d %H:%M:%S]"`"

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)