kubabuk Posted March 29, 2007 Share Posted March 29, 2007 hello everyone, I am trying read a content of a folder to the HDA using awk. Unfortunately I am on windows and that is the source of all of my problems I suppose. The awk expression works fine in cygwin but gives weird results in houdini. That is what I am using in Operator Type Properties > Parameter > Menu tab echo `system("ls c:/temp | gawk \'/\^B/\'")` or echo `system("ls c:/temp | gawk '/^B/'")` I assume i have to escape special characters with the backslashes, but both methods don't work work me. thanks kuba Quote Link to comment Share on other sites More sharing options...
edward Posted March 29, 2007 Share Posted March 29, 2007 On Windows, system() doesn't go through a shell, it runs the command directly. So you need to run your command through a shell, like csh. This worked for me: echo `system("csh -c \"ls ~ | gawk '/^B/'\"")` Quote Link to comment Share on other sites More sharing options...
kubabuk Posted March 30, 2007 Author Share Posted March 30, 2007 Thanks edward, works perfectly. kuba Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.