I work with a system wherein we can use a shell script to produce output for a web interface. It works pretty well, but in the case of an issue today, I need to be able to insert a break tag where a newline stop would normally go. My script looks like this:
#!/bin/bash
users=`decl . -read /Groups/admin | grep GroupMembers | tr ' ' '\n'`
echo "<result>"$users"</result>"
I'm looking for a way for the \n to be a <br />, which does not work by just replacing it in the command. The script works, meaning it effectively grabs the data and displays it in our web interface, but the users are all on one line, which is not the desired result.