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 John Tel 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: *

  • Users: Grizzly521
  • Content: Threads
  • Order by date
  1. Grizzly521

    Extract First Seven Characters Into A Variable

    Hi Im trying to extract the first seven characters of everyline of a file, then set those seven characters as a variable. The text file is generated by: who >> who.txt A line of text looks like: Username pts/## otherdata So Im trying to get the usernames which on my system are always...
  2. Grizzly521

    Replace Text Based On Pattern Matching

    Hi Im trying to replace text in a file based upon a pattern. The pattern Im looking for is: <styleURL>#style0002</styleURL> <name>#######6105#######</name> The # are seven alphanumeric characters before and after 6105. I need it to replace that with: <styleURL>#style0003</styleURL>...
  3. Grizzly521

    Extract Data From A Variable

    Hi Im wondering how to extract data from a variable, maybe using SED or AWK. I have a variable that contains YYYYMMDD, something like var=20091013. Can I extract the year, YYYY, to varY, the month, MM, to varM and the day, DD to varD?
  4. Grizzly521

    Script Input Flags

    Hi. Im wondering if there is a way to use flags when starting a script. Something like this. Script -a -b 10 Right now Ive got something like this. while getopts ab AA do case $AA in a) var="value" ;; esac done So with that code I can only use flags ( -a -b...

Part and Inventory Search

Back
Top