To pass perl one-liner as an argument to ssh command line, it can be done as follows
ssh server_ip_address << HERE zcat /usr/local/apache/logs/access_log.20150424.gz | perl -ne 'print if $_ =~ /" 404/'
HERE
ssh server_ip_address << HERE zcat /usr/local/apache/logs/access_log.20150424.gz | perl -ne 'print if $_ =~ /" 404/'
HERE
No comments:
Post a Comment