Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 >?

share|improve this question
up vote 5 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.