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 strongm 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: cptk
  • Order by date
  1. cptk

    XSD Schema - use the name of xml file within the xsd rules?

    I'm a newbie ... Within a xsd schema, I'd like to know is it possible to apply a different rule based on the actual name of the xml file I'm validating? For example, a specific tag (eg. <devUse>) is valid only for xml files that contain "debug" in their actual xml file name. If the xml file...
  2. cptk

    Regexp Help

    Thanks guys for the responses ... I was just trying to exclude a repeating char class, something like this: string: 'ABC 123 MM' /([M]{2})+/ ## returns 'MM' but something like this doesn't work: /([^M]{2})+/ ## expecting 'ABC 123 '
  3. cptk

    Regexp Help

    /([^M]*)(M+)?(.*)/ I think this works ... but needs tightening up ... Like /([^M{2}]*)(M{2})?(.*)/
  4. cptk

    Regexp Help

    ...to capture contents seperately both before and after 'MM'. If 'MM' doesn't exist, just capture the entire string. examples: If 'MM' exist ... /(.*)M{2}(.*)/ $1 = 'id <xx> ' $2 = ' blah blah' This is ok...but obviously I have to account if 'MM' is not in string. I've tried ...
  5. cptk

    Positive vs. negative look behind pattern search

    If you test on the other side, this works: /dog(?=\s)/ Anotherwords, it will return either dog at end of line or dog suffixed with white space(s). So my question boils down to this: /(?<=\s)dog/ doesn't recognize the ^ but, /dog(?=\s)/ recognizes the $. ...Why?
  6. cptk

    Positive vs. negative look behind pattern search

    Thanks for the reply ... yes it makes sense and yes, I'm well aware of the "taboo" of double-negatives ... I'm positive about that (lol)!! I went with this /(?<!\S)dog/ because I could not get the following positive lookback alteration to work: /(?<=^|\s)dog/ ## or any other format...
  7. cptk

    Positive vs. negative look behind pattern search

    When running the following 2 lookbehind zero-width assertions : /(?<!\S)dog/ ##Match a non-non-whitespace char /(?<=\s)dog/ ##Match a whitespace char ... why would I get different results? That is, the first lookbehind will match if "dog" is at the beginning of the line, the 2nd lookbehind...
  8. cptk

    Redirecting output, can I get actual name of file?

    Annihilannic - thanks for responding - it's been a while since I addressed this issues ... I've moved on from this issue, as we all need to do eventually, but the geek in me would still however like to find a solution to this ... Soooooo ..... No, /opt/ctis/adapt/ZHU is not the final file...
  9. cptk

    Character Class ?

    polar1 - I'm not clear exactly on what you're goal is, could you be more specific? Anyway, for starters ... 1.) your rowa & rowb variables are identical 2.) you're missing a [ and a backtic ` Also, try this: for i in $rowb do if [`echo $i | /usr/xpg4/bin/egrep [[:digit:]]` = 3 ] then...
  10. cptk

    List directory structure with files

    easier to read format ??? Can you be more specific ... How about this: ls -Rp | egrep -v '\/$|\.:' The "p" argument appends a slash '/' after each dir name, thus allowing the egrep -v to remove these dirs (as well as the current dir '.:' element). Otherwise, these dirs would be recursively...
  11. cptk

    Redirecting output, can I get actual name of file?

    Sorry Annihilannic, my bad - I took liberty on what's a VOB - it's Clearcase's version controlled files (Versioned Object Base). Also, let me clarify with respect to the effects of a VOB file. It's not where I excute script from, it's where I'm directing the 'RDFILE' file that's an issue - if...
  12. cptk

    Redirecting output, can I get actual name of file?

    I'm on Solaris 9 ... BTW, the reason why I orig. fell away from the idea of using lsof is because when I run lsof from a VOB directory, the lsof output doesn't list the redirected file name like it does when I run from a non-VOB directory ... hmmmm
  13. cptk

    Redirecting output, can I get actual name of file?

    Actually, I get this direct struct /proc/$$/fd in either case ...
  14. cptk

    Redirecting output, can I get actual name of file?

    Thanks guys so far, but still not working ... my path: /proc/$$ contains the following: [No View Set]:betta: /proc/19845 >ls -lA total 9215 -rw------- 1 cpver users 4685824 Nov 5 22:06 as -r-------- 1 cpver users 152 Nov 5 22:06 auxv -r-------- 1 cpver users 32 Nov...
  15. cptk

    Redirecting output, can I get actual name of file?

    Thanks guys ... lsof is not a working as orig. thought - the expected pattern is not always consistent (on my system), thus I can't successfuilly always pattern-remove the leading chars to get at the trailing file name. Sammy - I'm exploring your solaris idea of /proc/$$/path/1, but I'm still...
  16. cptk

    Redirecting output, can I get actual name of file?

    ...ahead of time. Anyway, yes I am using the -t test, but what I found that looks promising is the utility 'lsof'. By using the pid=`echo $$` shell variable with the following: tmp=`lsof - p $pid -a -d 1` ### -a=and, -d file descr. FD=${tmp##*/} ## removes pattern from left, returns file name
  17. cptk

    Redirecting output, can I get actual name of file?

    ...myprogram > RDfile Is there a way to reference the actual redirected file name 'RDfile' in the ksh script? Built-in shell variables like $* or $@ don't include any of the tokens right of the ">" cmd. What about referencing the file descriptor ... how? What I need is the actual file name...
  18. cptk

    grep -w and the effects of special characters

    No thanks ... I'll stick to just coding ...
  19. cptk

    grep -w and the effects of special characters

    p5 - What the hell is that?
  20. cptk

    grep -w and the effects of special characters

    Annihilannic - You are in deed right - as I would expect it (lol)... I'm just amazed that the definition of word-constituent characters includes only the following 3 items: letters, digits, and the underscore. Why not have available another word-like option switch to be defined as between...

Part and Inventory Search

Back
Top