linux - looping through dates in hp unix via arthmatic operations -
Hello I am using HP Unix, I'm trying to loop through the last 20 days (current date In relation to) loop for one For
, do the day ($ c = 1; c & lt; = 5; c ++) $ c = $ (perl -e 'use pOSIX; print strftime "% Y % M% D \ n ", local time-86400 * $ c; ') afterwards do some action with some $$ c , the issue is that some strange reasons 86400 * $ c is not being executed, can anyone point to the mistake? Thanks in advance.
Try different quotes:
day $ c = $ (Perl-e "use POSIX; print striptime cueq ( % Y% m% d \ n), local time-86400 * $ c; ") (I'm not familiar with HPUX, but it seems that $ c is not being interpolated by Shell.) Edit: Or slightly smaller:
day $ c = $ (perl-MPOSIX -le) "Print strokefire '% Y% m% d', local time-86400 * $ c;")
Comments
Post a Comment