On 2025-09-22 11:37, Remind list wrote:
> I have a question about variables in remind, specifically I'd like to
> reuse a variable outside of remind without throwing awk at my .rem
> files.

While I don't know of any particular "dump vars" aspect of Remind (other
than possibly parsing through debug-dump output), I can think of a
couple ideas depending on your use-case:

- if it's a simple variable-value (rather than one you're using remind's
smarts to calculate), you could have the variable stored in an external
file and import that as your setting while also accessing it

  $ cat myvar  # available outside Remind
  myvalue
  $ cat my.rem
  SET myvar system("cat myvar")
  REM MSG myvar = [myvar]

- you could create a custom Remind file that you INCLUDE/DO in your
reminders, and then create a custom reminder file that just includes
that without a banner, and use that for your variable-reporting

  $ cat myvar.rem
  SET myvar "myvalue"

  $ cat normal.rem
  DO myvar.rem
  REM MSG myvar = [myvar]
  REM Apr 1 MSG April Fools

  $ cat justvar.rem
  DO myvar.rem
  SET $AddBlankLines 0
  BANNER %
  MSG [myvar]

  $ remind -f normal.rem
  [your normal reminders here]

  $ remind -f justvar.rem
  myvar

You might also be able to pull in the value from an external
authority/source by munging it with INCLUDCMD.

-Tim
-- 





_______________________________________________
Remind-fans mailing list
[email protected]
https://dianne.skoll.ca/mailman/listinfo/remind-fans
Remind is at https://dianne.skoll.ca/projects/remind/

Reply via email to