In the documents for my classes, I set lots of flags to either show answer or hide answers, to create a slightly different version of the document, for all sorts of purposes. I generally don't like having to go into the document and change something to create these modifications. Instead, I create a directory I call ./.design in which I place various files whose existence (or lack thereof) determines which modifications take effect.
My answer is here is about how to build an interface at the command line to facilitate changing how the file gets compiled. The other answers show you how to implement those changes once they've been made.
So for example, I might have the following files in my ./.design directory:
show_answers.true
two_column_doc.false
compile_practice_version.false
That way, at a glance I can see how I've set up the document. I've also created a perl script that allows me to easily toggle or change these settings (for my private purposes not all of them are binary).
For your command, here's an approach to you question following my idea.
First some perl code:
#!/usr/bin/perl
use strict 'vars';
&MAIN(@ARGV);
sub MAIN {
my $fh_true = "./.design/show_comment.true";
my $fh_false = "./.design/show_comment.false";
if ( -e $fh_true )
{
system("mv $fh_true $fh_false");
}
elsif ( -e $fh_false )
{
system("mv $fh_false $fh_true");
}
else
{
system ("touch $fh_true");
}
}
The perl code can be called from the command line. It does one of two things, it either toggles the name of the file between ./.design/show_comment.true and ./.design/show_comment.false or, if neither file exists, it creates ./.design/show_comment.true as a default value. All levels of complexity can be added to such a perl script.
And then the document you wish to create can be written as
\documentclass{article}
\makeatletter
\newcommand\privatecomment[1]{%%
\IfFileExists{./.design/show_comment.true}
{``#1''}
{\unskip\@bsphack\@esphack}}
\makeatother
\begin{document}
Hello \privatecomment{world} and more stuff.
\end{document}
Here's the result when ./.design/show_comment.true has been created:

There are some problems with this particular definition. When ./.design/show_comment.true does not exist we get the following result:
