0

Crappy title, yes. But I honestly have no idea what this particular line of code does, aside from the fact that it probably passes some argument into a perl script. Here's the line:

dbget.pl "params::INSTANCES_*" | /bin/sed -e 's/^setenv \(.*\) '"'"'\(.*\)'"'"'; /\1 = \2/ ' > .gen_inst_cache.$$

I'm guessing there's a bunch of Regexp going on in here? That's probably why it looks so unreadable in the first place.

Thank you for any help.

JDS
  • 16,388
  • 47
  • 161
  • 224

1 Answers1

1

The script called dbget.pl called with "params::INSTANCES_*" as parameter will generate some output on standard output. This stream will be directed in stdin to sed, that is a stream editor.

Sed will substitute any line beginning with:

setenv (something) '(somethingelse)';[space]

into:

(something) = (somethingelse)[space]

The substituted output will be directed to a file called .gen_inst_cache.$$, where $$ is the pid number of your calling shell process.

dAm2K
  • 9,923
  • 5
  • 44
  • 47