[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script to build system information. Guru needed :)



Ron Johnson wrote:

2) I would like to redirect the output to a file called with the catenation of 'uname -n'.'uname -r'.config.YYYYMMDDHHMM.txt where YYYYMMDDHHMM is a timestamp of the command execution time. How do I obtain such value ?


$ date +%Y%m%d%H%M


How do I create the required backticks on my laptop keyboard (no separate numpad)


Umm, don't know your laptop works.

But.... There is a solution!! `foo` is now the non-approved method, and $() is now what the bash folks want us to use.

$ ts=$(date +%Y%m%d%H%M)
$ echo $ts
200412211158


You're GREAT Ron. Thank you so much.
Bob



Reply to: