in reply to Changing process name
#!/usr/bin/perl # # start as: # # shell$ perl changename.pl use strict; use warnings; print "ok, let me start...\n"; system "ps afx | grep ^$$"; # Assign to $0 and the magic's done! $0 = 'changed!'; print "it should have changed so far...\n"; system "ps afx | grep ^$$"; __END__ poletti@PolettiX:~/sviluppo/perl$ perl changename.pl ok, let me start... 21058 pts/4 S+ 0:00 | \_ perl changename.pl it should have changed so far... 21058 pts/4 S+ 0:00 | \_ changed!
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
|
|---|