The answer is twofold :
- The mechanism of shell history is merely a convenience for the user - thus it makes no sense to add anything to the history list beyond what the user enters. Aliases for example are not stored in their expanded form.
So for that case, the answer is "No, the shell history does not store noninteractive commands".
- In principle, under most Unixy systems, it is quite easy to find out what OS calls any program makes by running the truss command, finding the relevant portions within the logfile is then an exercise left to grep and some guesswork. So, for the general case, the answer is "Yes, it is possible to record what system calls a program makes". Also consider that your admin might supply you with a custom version of Perl that records the arguments to system() in a logfile.
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The
$d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider
($c = $d->accept())->get_request(); $c->send_response( new #in the
HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web