Hi,
Here I am finding one problem in unix. I need to inspect some files in a perticular directory. I receive the code belongs to various platforms. I am having a problem if the files belongs to C on Windows platform. They store the files using capitals in filenames like
MYHEADER.H
But in programs they use
#include <myheader.h>
I receive the files MYHEADER.H and when I inspect the code and analyzing I get an error on unix that file
myheader.h
is missing. In this case I create a soft link on unix like
ln -s MYHEADER.H myheader.h
and continue. Some times I get files like Myheader.h.
I wanted to write a perl script for such problems. I store all the missing files in one text file called 'missing-headers'. My logic is like this:
1. Open missing-headers.
2. Read a file and check entire directory if any file is found irrespe
+ctive of case(how to?).
3. If found create a soft link in the corresponding directory.
4. If not found report file name in a file 'really-missing.txt'.
Can you pl. help me in doing this in a smart & best way? Is there a facility in perl to create soft link?
I appreciate your help.
Thanks
Ashok
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.