M Print only the filename if a file contains a match. N Print the line number before each line that matches. V Print only lines that do NOT contain a match. E Match pattern if at the END of a line. B Match pattern if at the Beginning of a line. OFF Do not skip files with the OffLine attribute set. P Skip any file that contains non-printable characters Options can be any combination of the following switches: A: color Display filenames in colour (2 hex digits) d: dirlist Search a comma-delimited list of directories. F: file Get a list of filename(s) to search from a file (/ stands for console). G: StringsFile Get search string from a file (/ stands for console). R /C: string Use string as a regular expression. C: string Use string as a literal search string (may include spaces). String(s) Text to search for, each word a separate search. If you cannot do it in a single short sentence then it probably isn't appropriate.Search for a text string in a file (or multiple files) unlike the simple FIND command FINDSTR supports more complex regular expressions. Try to simplify each feature as far as possible so that it describes a definite action. Try organising your request into a bullet point list of specific features that you think would be generally useful in KiXtart. Things like sed, grep and awk have some great facilities, many of which would be very useful in KiXtart, but not everyone knows these utilities or which particular features you would find useful. My post both provides you with an immediate solution for your difficulties and attempts to clarify what featrues you think should be added to KiXtart that would help everyone who uses it. It is not clear in your first initial post what you are actually asking for, and you are mixing this with observations about difficulties you've had using things like Shell. Richard sounds like he's saying you should have to do everything the hard way. #114746 - 04:30 PM Re: find, findstr, grep, awk type functions Search for WSHPipe for piping and Howard Bullocks efforts for regular expressions. While it would be nice to have KiXtart friendly built-in function these requirements can already be satisfied, albeit with a little work and/or the use of existing UDFs. What would be appropriate and would resolve most of your requests would be a request for:ġ) Reading application output and writing directly to application input (piping).Ģ) Built-in support for regular expression matching. If you were using these utilites in *nix, you would be calling them in a shell (batch) script the same way that you use "SHELL" or one of the "pipe" UDFs in KiXtart. It is not appropriate to build these into KiXtart. If you have trouble finding them, post again in the general forum and I'll look up the link for you. If you want to use these in KiXtart, download the windows compiled versions - you'll find a couple of repositories on SourceForge. Things like "find", "grep" and "awk" are utilities, not scripting features - awk is an entire scripting language in itself. #114744 - 07:37 AM Re: find, findstr, grep, awk type functions Or perhaps to be able to search through a document and replace a specified word. That would be nice to have the expanded functionality of being able to read or write to a specific line, as well as have the option to either overwite that line, or add to either the beginning or end of the line. one for WriteLine() that does the opposite as well. I think I saw a UDF that expands ReadLine() to do something like this. Using shell to run a findstr command has been working out ok, but it'd still be nice to have it built in. I'm finding that using shell to try and do "find" command is near impossible without putting the command in a batch file and calling the batch file. I'd like to see built in functions similar to "find", and "findstr" in DOS, or "grep" and "awk" in Unix. Looking through, can't find this as having been previously suggested.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |