Unix/Linux shell script help

I used to know this stuff cold, but it has been a couple of decades. I want to create a shell script that reads links of text and replaces characters with a sequence of 1 to 3 other characters. For example, a->g, b->fd, c->xgh, d->k, etc. So “abcd” would be output as “gfdxghk”.

Would the following filter accomplish what you want?
sed -e s/a/g/g -e s/b/fd/g -e s/c/xgh/g -e s/d/k/g
This actually changes “abcd” to “gfkxghk” since the ‘d->k’ production operates after the ‘b->fd’ production. You’ll want to specify what behavior you want in such cases.

Cool, that looks like it will do the trick.