diff --git a/lifesaver.sh b/lifesaver.sh index 0bc7727..c1250ff 100755 --- a/lifesaver.sh +++ b/lifesaver.sh @@ -1,6 +1,9 @@ #!/usr/bin/perl + +#source: http://www.etherealbits.com/2012/06/the-perl-script-that-may-save-your-life/ + open(DEV, '/dev/sda1') or die "Can't open: $!\n"; while (read(DEV, $buf, 4096)) { print tell(DEV), "\n", $buf, "\n" - if $buf =~ /fletter/; + if $buf =~ /stringtosearchfor/; }