ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Find And Run Robot

alias help using ScanFs (to grep files from the FARR command line?)

(1/1)

ottenm:
I'm hoping to grep text files from the FARR command line, or at least open ScanFs with the arguments I type in to FARR.

Based on this 10-year old thread: https://www.donationcoder.com/forum/index.php?topic=13567.0
... I end up with the following alias in myaliases.alias (just changing the launch path).

<AliasText>grep</AliasText>
<Score>1000</Score>
<Results>
<Result>grep $$1 $$2 | C:\Users\user\AppData\Roaming\Saleen Software\Saleen ScanFs\ScanFs.exe /path=$$1 /contents=&quot;$$2&quot;&gt;+&gt;^grep (\S*) (.*)</Result>
</Results>

If I type "grep" into FARR it opens ScanFs, but has whatever I typed in to ScanFs the last time it ran.  If I try to add arguments in FARR ("grep *.txt needle") I just get from FARR "Sorry, no results."

Any suggestions *greatly* appreciated!

Nod5:
It looks like you're conflating the syntax for direct editing in the myaliases.alias file and the import syntax for the FARR options GUI.

Try creating a new alias entry in the FARR options GUI.
Go to FARR help > program options > Lists > Aliases... > myaliases.alias and click the "Add a new Alias" button and enter these

Alias trigger:

--- ---grepScore:

--- ---1000Regular Expressions pattern:

--- ---^grep (\S*) (.*)Results:

--- ---grep $$1 $$2 | C:\Users\user\AppData\Roaming\Saleen Software\Saleen ScanFs\ScanFs.exe /path="$$1" /contents="$$2"

Also, try the below command in Windows cmd, but replace <file path> and <search string> with something useful. If it doesn't work look up the correct parameter syntax for ScanFs.exe

--- ---C:\Users\user\AppData\Roaming\Saleen Software\Saleen ScanFs\ScanFs.exe /path="<file path>" /contents="<search string>"

ottenm:
Thank you for your help Nod5!  Looks like something in ScanFs.  It opens, but isn't reflecting any command line args.  I wrote an app just to display the command args, and called it with a search string and a file path, and they look fine.

Thanks a ton!  Will figure out what's happening down stream-

Navigation

[0] Message Index

Go to full version