in reply to crontab and perl script using system
That looks ok, but here is a straight perl approach:
my $bash_history = '/home/Anonymous/.bash_history'; open BH, "> $bash_history" and close(BH) or die "Could not empty bash_ +history: $!";
The history file is opened to write, not append, so its contents are lost but its permissions unchanged. perl 'and' binds a little tighter than 'or', so if either open or close fails, die is seen next.
After Compline,
Zaxo
|
|---|