I have a bash script to output the contents of a text file to html. Everything outputs ok, except this:
######################################################################
# #
# PRIVATE/PROPRIETARY #
# #
# ANY UNAUTHORIZED ACCESS TO, OR MISUSE OF ABC COMPANY #
# SYSTEMS OR DATA MAY RESULT IN CIVIL AND/OR CRIMINAL #
# PROSECUTION, EMPLOYEE DISCIPLINE UP TO AND INCLUDING #
# DISCHARGE, OR THE TERMINATION OF VENDOR/SERVICE CONTRACTS. #
# #
# ABC COMPANY MAY PERIODICALLY MONITOR AND/OR AUDIT SYSTEM #
# ACCESS/USAGE. #
# #
# #
######################################################################
Should look like this:
######################################################################
# #
# ***PRIVATE/PROPRIETARY*** #
# #
# ANY UNAUTHORIZED ACCESS TO, OR MISUSE OF ABC COMPANY #
# SYSTEMS OR DATA MAY RESULT IN CIVIL AND/OR CRIMINAL #
# PROSECUTION, EMPLOYEE DISCIPLINE UP TO AND INCLUDING #
# DISCHARGE, OR THE TERMINATION OF VENDOR/SERVICE CONTRACTS. #
# #
# ABC COMPANY MAY PERIODICALLY MONITOR AND/OR AUDIT SYSTEM #
# ACCESS/USAGE. #
# #
# #
######################################################################
The part of my script that uses this:
#!/bin/bash
echo "Content-type: text/html"
echo ""
TEXT=`echo "$QUERY_STRING" | sed -n 's/^.*var=\([^&]*\).*$/\1/p'`
FILE=$(cat /usr/local/apache/$TEXT | nawk 'sub("$","<br>")' |\
sed -e "s/\*\*\*/ /g" -e "s/\*\*/ /g")
echo $FILE
I had to remove the combinations of ** and *** because for some reason where ever they were in the file, the output would display all of the directory files. If I took the *'s out, it would not do this.