|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Wildcards in pathnames?Hi, I'm using CLISP 2.43 on OpenBSD and encounter a problem seems to be
clisp specific. $ touch '??.txt' $ clisp -q [1]> (probe-file #P"??.txt") *** - wildcards are not allowed here: #P"??.txt" The following restarts are available: ABORT :R1 ABORT Break 1 [2]>:q [3]> (probe-file #P"\?\?.txt") *** - wildcards are not allowed here: #P"??.txt" The following restarts are available: ABORT :R1 ABORT Break 1 [4]> :q [5]> (probe-file #P"\\?\\?.txt") *** - wildcards are not allowed here: #P"\\?\\?.txt" The following restarts are available: ABORT :R1 ABORT Break 1 [6]> :q [7]> My question is how to access the '??.txt' file in CLISP? Thanks! -- Dasn ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ clisp-list mailing list clisp-list@... https://lists.sourceforge.net/lists/listinfo/clisp-list |
|
|
Re: Wildcards in pathnames?Dasn writes:
> My question is how to access the '??.txt' file in CLISP? > Thanks! C/USER[72]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) (format out "Data coming from clisp.~%")) NIL C/USER[73]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) (read-line inp nil nil)) "Data coming from clisp." ; NIL C/USER[74]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) (format out "New data coming from clisp.~%")) NIL C/USER[75]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) (read-line inp nil nil)) "New data coming from clisp." ; NIL C/USER[76]> -- __Pascal Bourguignon__ http://www.informatimago.com/ CAUTION: The mass of this product contains the energy equivalent of 85 million tons of TNT per net ounce of weight. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ clisp-list mailing list clisp-list@... https://lists.sourceforge.net/lists/listinfo/clisp-list |
|
|
Re: Wildcards in pathnames?On 14/06/08 18:49 +0200, Pascal J. Bourguignon wrote:
> Dasn writes: > > My question is how to access the '??.txt' file in CLISP? > > Thanks! > > > C/USER[72]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) > (format out "Data coming from clisp.~%")) > NIL > C/USER[73]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) > (read-line inp nil nil)) > "Data coming from clisp." ; > NIL > C/USER[74]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) > (format out "New data coming from clisp.~%")) > NIL > C/USER[75]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) > (read-line inp nil nil)) > "New data coming from clisp." ; > NIL > C/USER[76]> > Thank you. I think you mean use shell instead of lisp. :) In Implementation Notes of Wildcard module: > \ > Removes the special meaning of the character that follows it. > This works even in character classes. > Should the pathnames be supported like that? -- Dasn ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ clisp-list mailing list clisp-list@... https://lists.sourceforge.net/lists/listinfo/clisp-list |
|
|
Re: Wildcards in pathnames?Dasn writes:
> On 14/06/08 18:49 +0200, Pascal J. Bourguignon wrote: > > Dasn writes: > > > My question is how to access the '??.txt' file in CLISP? > > > Thanks! > > > > > > C/USER[72]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) > > (format out "Data coming from clisp.~%")) > > NIL > > C/USER[73]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) > > (read-line inp nil nil)) > > "Data coming from clisp." ; > > NIL > > C/USER[74]> (with-open-stream (out (ext:run-shell-command "cat > '/tmp/??.txt'" :input :stream)) > > (format out "New data coming from clisp.~%")) > > NIL > > C/USER[75]> (with-open-stream (inp (ext:run-shell-command "cat '/tmp/??.txt'" :output :stream)) > > (read-line inp nil nil)) > > "New data coming from clisp." ; > > NIL > > C/USER[76]> > > > > Thank you. I think you mean use shell instead of lisp. :) > > In Implementation Notes of Wildcard module: > > \ > > Removes the special meaning of the character that follows it. > > This works even in character classes. This concerns only the functions from the wildcard module. > Should the pathnames be supported like that? It's up to the implementors to decide. In anycase, AfAIK it's allowed by the standard. (That is, it's purely implementation dependant). -- __Pascal Bourguignon__ http://www.informatimago.com/ You're always typing. Well, let's see you ignore my sitting on your hands. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ clisp-list mailing list clisp-list@... https://lists.sourceforge.net/lists/listinfo/clisp-list |
| Free Forum Powered by Nabble | Forum Help |