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

  1. menski

    Problem with old(ish) devices on new(ish) distros

    Sorted! The printer problem was in the BIOS. I finally remembered that I had a copy of the Administration Guide for SuSE 8.1 and dug it out. This tells me that the IO address for the parallel port should be 378, the interrupt is irrelevant, mode should be Normal, SSP or Output-Only and that...
  2. menski

    Problem with old(ish) devices on new(ish) distros

    Thanks for the help. I believe the distributions are currently running the XFree - everything seems to be marked XF - I'll soldier on with the other stuff duncan_mk
  3. menski

    Problem with old(ish) devices on new(ish) distros

    I been playing around w. open source *nixes since the mid 90's and have been using Linux as the system running my home computer since 2000/2001. During all of that time I have used a trackball attached to my serial port and (for most of it) an HP Deskjet 540C attached to a parallel port. I...
  4. menski

    Report formatting query

    I haven't tested this - and I have to confess that it is unusual for my scripts to run straight out of the box - but something like this ought to work (where &quot;input.file&quot; is the name of your data file): BEGIN { tcount = 0 while ((getline < &quot;input.file&quot;) > 0) { if...
  5. menski

    Towards more colourful Awk scripting: using ANSI

    OK Chaps - it's done (now you must all (both of you) vote it brilliant). Glad you found it useful! dmk
  6. menski

    How can I introduce colour into the output of my Awk scripts

    ANSI code has always been pretty much of a minority interest and (slightly old fashioned) black art, but it is useful & can be very effective in conjunction with Awk. This FAQ just covers the graphics parameters that allow coloured text, reverse video etc - it does not cover the parameters...
  7. menski

    Towards more colourful Awk scripting: using ANSI

    Um - thank you! I'm glad you like it - but I don't have a clue as to how to turn it into an FAQ (and HAS anyone ever asked the question?) dmk
  8. menski

    Towards more colourful Awk scripting: using ANSI

    This is by way of a tip. I have always used ANSI codes to display colour error messages or warning signals in batch files etc. When I moved to Linux I was looking for a way to continue using them. There is plenty of good stuff on the internet (a search on Google using &quot;\330 ANSI&quot...
  9. menski

    On the curious behaviour of variables!

    Sorry abot that: this should look OK. BEGIN { FS = &quot;:&quot; print &quot;\n AWKSEARCH - Start: for (i=2; i < ARGC; i++) { if (ARGV == &quot;-d&quot;) {disponly = &quot;y&quot;} else if (ARGV == &quot;-f&quot;) {fileonly = &quot;y&quot;} else if (ARGV == &quot;-r&quot;) {recurse =...
  10. menski

    Somewhere to RTFM

    If what your looking for is just some printed information about Linux I can recommend the Petersen book on Linux in the Complete Reference series published by Osborne/McGraw-Hill. These books used to be fairly keenly priced - my 3rd edition from 1999 cost £27 which, even then, wasn't bad for a...
  11. menski

    Running a command from within a variable?

    marsd - sorry about the delay. The project is becoming embarassingly like a Swiss army knife - but your suggestions worked well. Thanks dmk
  12. menski

    On the curious behaviour of variables!

    Given that I have the folloiwing chunk of program: BEGIN { FS = &quot;:&quot; print &quot;\n AWKSEARCH - Start: for (i=2; i < ARGC; i++) { if (ARGV[i] == &quot;-d&quot;) {disponly = &quot;y&quot;} else if (ARGV[i] == &quot;-f&quot;) {fileonly = &quot;y&quot;} else if (ARGV[i] ==...
  13. menski

    Running a command from within a variable?

    Oh wow! Slightly more complicated than I hoped. Part of the problem is that the script is already very large. It is designed to take the result of ls -aR1 convert it into a nice clean list, pump it through <file> to check which files are text files and then check these for the occurence...
  14. menski

    Running a command from within a variable?

    Unfortunately, this doesn't quite cut the mustard. The exact nature of the problem is that I have a script which I need to call with certain command line arguments giving (amongst other things) the search text + any files or directories to exclude. eg: awktest -x /bin -x .bash_history -t...
  15. menski

    Running a command from within a variable?

    HTH - this looks good, thanks! I'll give them a whirl. dmk
  16. menski

    Running a command from within a variable?

    Some languages allow you to put a command into a variable which will then run when the variable is called. eg: print_field = &quot;print $1' '$2' '$4&quot; might be put away at some point in a script and called later to output the contents of these fields. It appears that this is not so...
  17. menski

    I would like to use a stream of filenames from a pipe

    Yes, that's great. Actually, I feel a bit of an idiot, it is very similar to an example in the Gawk Info file with which I had already been (unsuccessfully) experimenting. Thanks for the help!
  18. menski

    I would like to use a stream of filenames from a pipe

    To CaKiwi: Smashing, thanks! I'll try it tomorrow (I'm at work now) and get back with the result. dmk
  19. menski

    I would like to use a stream of filenames from a pipe

    I have a script which has got so far: file .* | awk -F: '/text/ {print $1}' as you can see, it hasn't got very far - but it does output a list of the filenames of files identified as text files (rather than directories, binaries or etc). The next thing I need Awk to do is open each of...

Part and Inventory Search

Back
Top