Modify Perl script to work with txt - Permissions script
I need modify this code to work, with ls -shalR / result in a txt
How start??? What read or what need... Code:
#!/usr/bin/perl Thanks for your time |
That has got to be one of best formatted & commented programs I have ever read. Nice work.
Unfortunately, however, I think that Perl is the wrong thing to use on the the output of a CLI tool like ls. I think the essence of what you are trying to do is something like this: Code:
# save the starting point I have not been able to test all my code, only some key elements. In spite of your fine efforts, I don't read Perl easily, so I may may missed some features you included. I especially think you have more elaborate processing of deleted users & groups, I have made no provision for detecting those. I don't understand why you used the "-a" option in ls. I think "-A" is better because I can't see re-processing the '.' & '..' directory entries. This may mean I am seriously missing something you are trying to do. I also don't understand why you used the "-s" & "-h" options at all. Again, I may be missing something, but I thought all you are interested in are the ownership & permissions. As the comment says: "# I don't check for or try to rename earlier files". I think that rather than exiting it would be friendlier to make sequentially numbered backups of any earlier scripts. Although you mentioned a "txt" in your actual Q, I chose not to make a file listing either the flies or directories processed. That could easily be changed. Even if you continue developing this in Perl, I hope stat & ls -A will be useful to you. |
Not exactly
I have .txt file result of ls -shalR i need... adapt the code i publish... for work with this result (txt)
Some one say me i need parser... or something like that... I preciate your time and help, i don't write the script is from someone else... Very good code no??? i am really happy for this programmers share your code for others can learn. |
Sorry, I don't do Perl -- can't help further, good luck.
|
Thanks!!!
No problem men, i really preciate your comment and help, i need to think and start to learn to solve this problem but!!! thanks thanks for real
|
All times are GMT -5. The time now is 06:21 PM. |