I tried to use a copied script, which includes the following command

echo "rc  $2" > $WORKDIR/out.dat

I can guess it tries to output some contents to file out.dat. But what does rc $2 mean?

It also includes

echo "PWD" >> $WORKDIR/env.txt

Why does it use >> here instead of >?

1 Answer 1


Neither of these are actually echo questions.

"rc $2" is the text "rc", a space, and the second argument passed to the script or function.

>> appends to an existing file, as opposed to > which writes to a new file, erasing any existing file in the process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .