In my script I am creating a temp directory with this command
TMPDIR=$(mktemp -d)
and later when I want to create a file there I use (with $DATA
being my source data file)
touch $TMPDIR/data
echo "$DATA" > $TMPDIR/data
command. Later on, I use awk to alter the data with this syntax :
awk '
{ a[i++]= ($0 * '$factor') }
END{
{ for (j=0;j < i;j++) print a[j] }
}
' ${TMPDIR}/data
and then I use gnuplot to plot it. But gnuplot says there are some errors and thus I wanted to print the $TMPDIR/data
with cat. But it says the file doesn't exist. What do I do wrong ?
Thanks