The cleanshar.pl Perl Script
If you are worried that your shar file is bad, you can
use the above perl script to see if the file is ok:
- REMINDER: Do NOT send non-ASCII files (e.g., word
documents, binaries).
- Read the documentation header in the script.
NOTE that you may have to change the pathname in
the first line of the script to point to the
location of your perl interpreter.
- Make your shar file (suppose it is called A.shar).
- Then, run "cleanshar.pl A.shar". If it finds anything
wrong, it will try to fix it and save the old copy.
cleanshar.pl only fixes non-conformant shar files.
It can not read your mind.
- Look at the contents of A.shar using less (more) or
an editor. You should see a list of your files.
- If you are still worried, then email the file to yourself:
mail -s "my shar test" YourLogin < A.shar.
- Read your email and save the email to a file IN A
DIRECTORY AWAY FROM YOUR SOURCE CODE (e.g., ~/tmp/A.email).
- Edit ~/tmp/A.email to remove mail headers, etc. and save
it to a file (e.g., A.shar). It's just your files with
some Bourne shell stuff surrounding it. There should be
a table of contents near the top that lists your files.
- Extract the files: cd ~/tmp; sh A.shar. The files should
be in your ~/tmp directory or whereever you are at this
point.