User Profile

Collapse

Profile Sidebar

Collapse
winlinfix
winlinfix
Last Activity: Mar 31 '08, 08:23 AM
Joined: Mar 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • winlinfix
    replied to perl with shell dont accept variable
    in Perl
    Hi,


    Thankx for the help but i found another way to solve my problem.
    Code:
    #!/bin/sh
    
    echo "perl -00ne '/$1/ && print \$_' $ar/httpd.conf.bak27marn" > vl.sh
    /bin/sh vl.sh
    it is working fine.
    as perl and shell both are differnt language they do understand different syntax so it would be good to redirect result in one file and run as perl.

    Thank ...
    See more | Go to post
    Last edited by eWish; Apr 1 '08, 03:25 AM. Reason: Please use code tags

    Leave a comment:


  • winlinfix
    replied to perl with shell dont accept variable
    in Perl
    HI,


    $1 = command line variable
    it means i am passing

    ./domcheck.sh domainname.com

    $1 = domainname.com
    See more | Go to post

    Leave a comment:


  • winlinfix
    started a topic perl with shell dont accept variable
    in Perl

    perl with shell dont accept variable

    Hi

    I am using running one perl command using shell scripts, but it won’t take variable
    Code:
    #!/bin/sh
    ar="/usr/local/apache/conf"
    perl -00ne '/$1/ && print $_' $ar/httpd.conf  > domstat.txt
    I am passing following things on command line
    ./domcheck.sh domainname.com
    but perl unable to understand $1 even its not highlight as variable.
    See more | Go to post
    Last edited by eWish; Mar 28 '08, 12:29 AM. Reason: Please use code tags
No activity results to display
Show More
Working...