abs-lang / abs

Home of the ABS programming language: the joy of shell scripting.
https://www.abs-lang.org
MIT License
516 stars 35 forks source link

Discussion forum #489

Open kpym opened 1 year ago

kpym commented 1 year ago

Is it possible to enable "Discussions" for this repo? That way newbies like me can ask stupid questions like "How can I loop over all .json files?" IMO, the issue tracker is not the right place for this.

odino commented 1 year ago

I think it's ok for the time being for you to post it here, we could eventually add it as an FAQ on the website. The forum would be really nice but tbh I don't have a lot of time as it stands, and looking both at the issue tracker and the forum would not end up great 😃

On Sat, Apr 15, 2023, 8:31 PM Kroum Tzanev @.***> wrote:

Is it possible to enable discussion for this repo? That way newbies like me can ask stupid questions like "How can I loop over all .json files? IMO, the issue tracker is not the right place for this.

— Reply to this email directly, view it on GitHub https://github.com/abs-lang/abs/issues/489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQFZEO4ECU7BNQQ4R72B3XBLEP5ANCNFSM6AAAAAAW7QKM6Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

odino commented 1 year ago

Also... 😊

How can I loop over all .json files?

➜  /tmp cd loop-json 
➜  loop-json echo "{}" > x.json
➜  loop-json echo "null" > y.json
➜  loop-json echo "" > z.txt
➜  loop-json abs
Hello alex, welcome to the ABS (2.6.0) programming language!
Type 'quit' when you're done, 'help' if you get lost!
⧐  for file in `ls *.json`.lines() { echo("${file}: %s", `cat ${file}`) }
x.json: {}
y.json: null
⧐  
kpym commented 1 year ago

I understand. Thanks for considering my request.

kpym commented 1 year ago

I realized that this program will not run on Windows because ls is not recognized. So how can we loop over files independent of the OS?