I am trying to write a simple bash script that executes the command tcprobe -i $1 where $1 is an mp4 file.  Then, I want to write the output of this command, which should be a long string of information about the video file, to a file called frameInfo.My code currently is:#/bin/bashecho (tcprobe -i $1) > frameInfoHowever, this writes the output of tcprobe to the file.  What am I doing wrong?  I'm sorry if this is a simply question, but I am new to bash scripting.
Writing the output of a command to a file in a bash script
shell script;files;error handling;write
You don't need your echo nor parenthesis here. Checking $1 was defined could be relevant as well:#!/bin/shif test $# -eq 0; then    echo missing argument    exit 1fi >&2if test $DEBUG; then    set -x    tcprobe -i $1    echo returned $?    set +xelse    tcprobe -i $1 >frameInfo 2>&1fiexit 0use DEBUG=toto ./your/script yourFileArgument, to enable debugs.