find command problems in perl script -
I am writing a script that will create a new tar file which will only be created in the files of the previous tar.gz file Afterwards were made were made. However, the outbound order of $ order shows that each result is on the new line, so why am I not receiving concerted command for the tar? Thank you. How to solve your immediate problem? : if you have files in a row So if you can create a variable and add them or whatever you can, I just want to show you a better way of calling a system command (this will be even better if you open it directly. Without a command call, but you are relying on the shell extension there). The perpendicular At times you can learn how to Globing Curr Diab instead of placing so much trust to use search / routine Own Pearl and systems. My $ path_to_logs = "/ home / myscripts /"; My $ FNAME = `ls -t * .tar.gz | Head-n1`; My $ FILENAME = $ path_to_logs $ FNAME; Chomp ($ FILENAME); If (-i $ FILENAME) {my $ converted = `search '-name' * .log '- new $ FILENAME`; $ Chomp changed; $ Command = "tar-cvzT" $ has been changed. "-f Delevestem - $ (date +% Y-% m-% d-% H-% M-% S) .tar.gz"; Chomp $ command; Print $ order; }
find my $ find_cmd = "-name" * .log "-newer $ filename"; Open in my $, '-', $ find_cmd or die "command can not be executed Could. $! \ N "; While doing something with {chomp; print" file: $ _ \ n ";}
Comments
Post a Comment