Search found 4 matches

by two-
Mon Feb 21, 2011 9:16 am
Forum: newLISP in the real world
Topic: passing format a list of strings
Replies: 3
Views: 3636

passing format a list of strings

I have a function run-sh defined as so: (define (run-sh sTr) (exec (format {'%s'} sTr))) run-sh is a kind of basic function that takes input sTr - the shell command. newLISP can call it like this: (run-sh {ls -a -l}) or, so i wish. The problem is this is my error message: sh: ls -a -l: command not f...
by two-
Sat Feb 19, 2011 12:47 am
Forum: newLISP in the real world
Topic: replacing a period in a string using replace
Replies: 4
Views: 4197

Re: replacing a period in a string using replace

Thank you, itistoday.
by two-
Fri Feb 18, 2011 10:51 pm
Forum: newLISP in the real world
Topic: replacing a period in a string using replace
Replies: 4
Views: 4197

Re: replacing a period in a string using replace

Oh. Thank you ;}.
So, the return value of (exec "pbpaste") is a list (of strings), and in this case the first element of that list is the string "Object.Oriented.Analysis."

Can you have println print without the trailing newline?
by two-
Fri Feb 18, 2011 6:14 pm
Forum: newLISP in the real world
Topic: replacing a period in a string using replace
Replies: 4
Views: 4197

replacing a period in a string using replace

i'm using textexpander on mac os x. the result of the following code is no output. nothing. #!/usr/bin/newlisp (set 'text (exec "pbpaste")) (replace {\.} text " " 0) I want to replace every occurance of the period {.} with a space " "... The following code also produces no output: #!/usr/bin/env new...