The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 04-20-2008
psychobeauty psychobeauty is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 17
i try it!!!

and it does not work!!
its get me a syntax error..

i used it like this

Code:
#!/bin/sh

read -p "what date" vardate
echo $vardate

case $# in 0|1) echo "syntax: $0 date files ..." >&2; exit 2;; esac

date=$1
shift

awk "/$date/" "$@"

am i wrong somewhere??


my log files text are in this format : 162.12.56.7 Tues Feb 8 21:02:35 GMT 2008