Useful scripts

I see an AI post on a forums as being the same etiquette as posting a google link. I.e:

https://www.google.com/search?q=scripts

But sometimes (admittedly fairly rarely) that is valid. If its a complex or non-intuitive search, likewise if it is a complex query and it took a while to stage the issue within the LLM context.

People here (myself included) got frustrated by one guy spamming a bunch of reddit links. As always everything is fine in moderation.
 
I disagree, AI has helped me out numerous times. It doesn't always give me the correcr solution but often points me in the correct direction.
You misunderstood.
I did not say, "Don't use AI!"
I said, "Please, stop posting AI generated stuff here in the forums!"
That's quite a difference.
 
Code:
#!/usr/local/bin/bash
# 0-------------------------------------------------------------------------0
# | make_All_ports_dir                                                      |
# | fill directory /usr/ports/All with symlinks to all portdirs             |
# | (so you can find the nvidia-drivers in category x11 and not x11-drivers |
# 0-------------------------------------------------------------------------0
cd /usr/ports
mkdir -p All
ls | while read cat_name
do
  if [ -d "$cat_name" ]
  then
    cd "$cat_name"
    ls | while read port_name
    do
      if [ -d "$port_name" ]
      then
        echo "port: $cat_name/$port_name"
        ln -fs "/usr/ports/$cat_name/$port_name" "/usr/ports/All/$port_name"
      fi
    done
    cd - > /dev/null
  fi
done
 
Back
Top