Interpreted Herdocs?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
s243a
Posts: 2580
Joined: Tue 02 Sep 2014, 04:48
Contact:

Interpreted Herdocs?

#1 Post by s243a »

I was wondering if I could put something like the following inside a heredoc:

Code: Select all

$(case $GCC_VERSION in 
   1); echo "id /var/lib/tazpkg/installed/gcc
             id /var/lib/tazpkg/installed/gcc-lib-base
             id /var/lib/tazpkg/installed/gcc-lib-math"; ;;;
   3); echo "id /var/lib/tazpkg/installed/gcc3"; ;;;
   49); echo "id /var/lib/tazpkg/installed/gcc49
              id /var/lib/tazpkg/installed/gcc49-lib-base"; ;;;
   54); echo "id /var/lib/tazpkg/installed/gcc54
              id /var/lib/tazpkg/installed/gcc54-lib-base"; ;;;
   64); echo "id /var/lib/tazpkg/installed/gcc54
              id /var/lib/tazpkg/installed/gcc54-lib-base"; ;;;
  )
so that I get a different string depending on the variable GCC_VERSION.

If your curious I'm working on a script to install the packages that I want for TazPup and hopefully to also build a devX (See Post)

Anyway, I'm going to give it a try and I'll report back on whether or not it works.

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#2 Post by technosaurus »

This thread may be useful. It is designed for localization, but the same concepts apply.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply