Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. shahrir

    awk newbies

    i don't really understand that coding Salem..but i try this and its works.. on top of script i declare a var like this set readGrep = `grep -i $input carfile` if ( "$readGrep" == "") then echo "invalid data" else grep -i $input carfile | ......(as the script...
  2. shahrir

    awk newbies

    i think i have the solution already..using grep and pipe with awk grep -i '$input' carfile | awk '{print $2}' ..u were rite salem i did have a mismatched {} but the problem is (as im still new in linux) how to create an error msg if the user enters an input that didn't match any of the section...
  3. shahrir

    awk newbies

    hi guys, sorry if i posted so many questions in a single topics...CaKiwi i've try your code but the result is unmatched.. the basic idea of creating the system is to display the car chasis no,model and age by entering either car model,year or age... i try to use grep and filter it with awk but...
  4. shahrir

    awk newbies

    tq 4 the source CaKiwi eventhough i havent try it yet ;)this comes to another question...how should i make this program ignore lower or upper cases? I've read about the IGNORECASE but how to use it?
  5. shahrir

    reference 4 the helpers :)

    this is the example of inside the 'carfile' 11221212 hondacamry july 1998 21123453 HondaCamry jun 2000 12321122 Citroen may 2001
  6. shahrir

    awk newbies

    switch (&quot;$choice&quot;) case &quot;[Aa]&quot;: echo -n &quot;Please Enter The Car Model : &quot; set input=&quot;$<&quot; gawk '/$input/ {print &quot;Car Model: &quot;$2;print &quot;Chassis No: &quot;$1;age=(2003-$4);print &quot;Age of the car: &quot;age}' carfile echo...

Part and Inventory Search

Back
Top