xtof54 is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

I have a script (bash).

I want to specify redirect to stdout to a file name that is a variable, "ofile"

for f in `ls NW*.txt`
do
base=${f:0:6}
ofile="${base}_cleaned.txt"
python3 ../software/cleanTextGridOutput.py $f > ${ofile}
done

This is creating an empty file with the name specified as ofile.

Help?

.. and now for some reason, it's working all of a sudden..

Thanks duckies! :)

@Rolston disk caching ? should wait for flushing maybe

@xtof54 How does one flush? Just keep running until it works??

So the syntax was correct?

xtof54 @xtof54

@Rolston I think it's ok ;-)

For flushing I smtimes replace redirect with

script -f
(not sure about the option tho)
but it's a different use case :-/

@xtof54 Ok. Cool.

I got it to work again, so I am going to try not to touch it anymore. :)