I'm writing a .sh script like the following:
echo script started ./some_command > output_file echo script ended I'd like the output to be the following:
script started ./some_command > output_file script ended I've tried set -v, set +v but it didn't work properly,
is there anything similar to @echo in batch?
Thanks
#!/bin/sh -xThis will output each executionecho script started >&2, then run your script withmyscript 2> /dev/null, but that does not seem to be what you want.