14
3
In Linux (Bash), there's a way to use a command as a parameter for another command, using back-ticks:
> echo ===== `time` =====
This would print:
===== The current time is: 12:22:34.68 =====
Is there a way to do this in cmd.exe on WIndows ?
1
see this post
– Prince John Wesley – 2011-05-27T09:38:26.8603http://stackoverflow.com/questions/2768608/batch-equivalent-of-bash-backticks – cularis – 2011-05-27T09:38:55.953
Also see this this post (use of doskey command from cmd)
– misterjaytee – 2011-05-27T11:00:03.813@misterjaytee: Command substitution and aliases are different things. – user1686 – 2011-05-27T13:59:49.700
@grawity - Thanks for pointing that out - Note to self: must read the question properly before responding... – misterjaytee – 2011-05-30T13:26:08.957
That's not what
time
does. – Wuffers – 2011-06-06T21:25:29.623@Mark That's what
time
does on Windows... – Cristi Diaconescu – 2011-07-07T20:08:08.633@Cristi: Linux isn't Windows. On Linux,
time
measures how long it takes a script to execute. – Wuffers – 2011-07-07T20:30:30.903