LOCATION=/export/home/byang/Test
If [-d $Location]; Then
CD $Location
LD_LIBRARY_PATH=/usr/local/lib
Export LD_LIBRARY_PATH
Ls *.zip & gt; A.a sc
If the test - s a.a sc; Then
The cat a.a sc | while read the line
Do
Echo $line
CD $LOCATION
7 za e $line - y
The done
Fi
CD $LOCATION
The PWD
Sleep 10
Rm - rf! (*.txt)
The rm * Summary. TXT
Fi
Error message is:
$./test. Sh
./test. Sh: line 19: the syntax error near unexpected token `! (* '
./test. Sh: line 19: ` rm - rf! (*.txt) '
Don't understand why would an error? How to change?
CodePudding user response:
Try the first line with #!/bin/bash or #!/bin/sh,CodePudding user response:
The first line is a #!/bin/bash, I just didn't write here,CodePudding user response:
Rm - rf! (*.txt) in parentheses is a special symbol, therefore complains, alternative statement is rm - rf ` find.! -name "*.txt" `. Thanks to the great god,CodePudding user response:
to log in to a great brotherCodePudding user response:
Rm - rf! (*.txt) under the interactive shell! Extensions said historical records, there is nothing wrong with the grammar, closed in the default script history extensions, so grammatical error,If you doubt me! The function, man bash, please have a look at to know,
CodePudding user response: