Help for this page

Select Code to Download


  1. or download this
    `your_command | tee test.txt` =~ /your_capturing_regex/
    
  2. or download this
    $ perl -le '`date | tee test.txt` =~ /^(\w+)/; print $1'
    Tue
    
  3. or download this
    $ cat test.txt
    Tue 18 Mar 2014 11:02:34 EST
    
  4. or download this
    system "echo @{[`your_command` =~ /your_capturing_regex/]} > test.txt"
    
  5. or download this
    $ perl -e 'system "echo @{[`date` =~ /^(\w+)/]} > test.txt"'
    
  6. or download this
    $ cat test.txt
    Tue