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. 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

    Ill give it a try at work tonight. I really appreciate it. Itd be running on Solaris 10. I cant remember what version Im running of the top of my head.
  3. Grizzly521

    Replace Text Based On Pattern Matching

    Thanks for the pointers. I didnt realize how vague I had been. * Is the # in front of style0002 also a digit ? No. I overlooked that when I picked # to represent variables * Are there other style0002 occurrences not enclosed in styleURL tags ? Yes. * Are there other style0002...
  4. Grizzly521

    Replace Text Based On Pattern Matching

    What more information do you need?
  5. 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>...
  6. 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?
  7. 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