RUN-SQL(1)

πŸ“¦
version 0.28 Β· 4 versions
, in fedora 44

πŸ’– RUN-SQL(1) πŸ’–

okay bestie, so this page lives in the User Contributed Perl Documentation section (yes, the cute little corner of the manual where perl people drop their scripts) πŸ’… and it's literally just run-sql.pl doing your database bidding. no cap.


✨ NAME ✨

run-db.pl β€” Run SQL πŸ¦‹

(yeah the file says run-db.pl here but every example below says run-sql.pl. that's just how it is. we don't fix it, we report it. πŸ’€)


✨ SYNOPSIS ✨

three whole ways to use this thing, pick your fighter:

run-sql.pl "select * from mytable where 1=0"

run-sql.pl --sql create-table.sql

echo "select * from mytable where 1=0" | run-sql.pl

like, you can pass the SQL as an argument, point it at a file with --sql, or just pipe it in like the main character you are πŸ‘‘


✨ ABSTRACT ✨

This sets up the database. The following options are recognized:

(that's it, that's the abstract. short and iconic. πŸŽ€)


✨ OPTIONS ✨

  • --user USERNAME β€” who you are, according to the database 🫢
  • --password PASSWORD β€” the secret. keep it secret. keep it safe πŸ”
  • --dsn DSN β€” The DBI DSN to use for connecting to the database 🌈
  • --sql SQLFILE β€” The alternative SQL file to use instead of what is passed on the command line. so like, file instead of shouting your query directly at it πŸ“„
  • --quiet β€” Output no headers for empty SELECT resultsets. nothing to see here, and it will not make you look at anything 🀫
  • --bool β€” Set the exit code to 1 if at least one result row was found. yes queen, let the shell know if you found anything πŸ“
  • --string β€” Output the (single) column that the query returns as a string without any headers. raw. unfiltered. just the string πŸ’…
  • --format formatter β€” Use a different formatter for table output. Supported formatters are:
    • tab - output results as tab delimited columns
    • Text::Table - output results as ASCII table
    • Text::Table::Any - output results as various formats
  • --force β€” Don't stop on errors. bold. risky. kind of unhinged but we respect it 😭
  • --help β€” Show this message. (hi, that's this. you found it. welcome πŸŽ€)

heads up bestie: --force means it keeps going even when stuff errors out. that's the whole point, so don't be surprised when it does exactly that πŸ™ˆ

and that's the whole page, fr fr ✨ this was perl v5.42.2, dated 2026-07-20, and it lives under the name RUN-SQL(1) πŸ’– ty for reading, mwah 🫢

πŸ“¦ where this page comes from