FreeBSD has jot(1) in base which I am using to print a random string appended
to a date stamp as follows:
The date+ character string should appear both as output on the console i.e.
as well as be appended to the "records" file indicated at the end of the
command. This prints as expected in the console, however when examining the
records file only the latter part gets appended to the file:
I am not clear as to what I am doing wrong here. Might anyone have an idea of
how to make "04_Apr_2022-mqfvscqu" appear as output in console as well as be
added to records? Any pointers would be very much appreciated!
to a date stamp as follows:
printf $(date +%d_%b_%Y)-; jot -r -c 8 a z | rs -g0 0 8 | tee -a records
The date+ character string should appear both as output on the console i.e.
04_Apr_2022-mqfvscqu
as well as be appended to the "records" file indicated at the end of the
command. This prints as expected in the console, however when examining the
records file only the latter part gets appended to the file:
mqfvscqu
I am not clear as to what I am doing wrong here. Might anyone have an idea of
how to make "04_Apr_2022-mqfvscqu" appear as output in console as well as be
added to records? Any pointers would be very much appreciated!
Last edited by a moderator: