It is ok when I send send one arguement to $TILL in the awk expression.
first(){
TILL=$1
echo $TILL
awk '/[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist
[*]}
}
echo "<table border = '1'>"
echo '<tr><td> </td><td>' ; first 'c: '</td></tr>'
echo '</table>'
However when i send more than 3 arguement I recieved the unterminated regular expression.
first(){
TILL=$1
echo $TILL
awk '/[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /'$TILL'\/ {P=1} ' ${dirlist
[*]}
}
echo "<table border = '1'>"
echo '<tr><td> </td><td>' ; first 'c: NT Authority' '</td></tr>'
echo '</table>'
$ sh filepermission.sh
<table border = '1'>
<tr><td> </td><td>
c: NT AUTHORITY
awk: cmd. line:1: /[Cc]:\\/ {P=0} P {print $0 "<br>"} FNR==1{printf("File %s:<br>", FILENAME)} /c:
awk: cmd. line:1: ^ unterminated regexp
</table>