Sed -i "s/` cat TBCxiug dat | awk '{print $2}' | awk 'NR 74=={print}' `/` cat a.t xt | awk '{print $2}' | awk 'NR==1 {print}' `/g" TBCxiug. Dat
/opt/software/.../nessus/opt/software/.../license. TXT/home/.../TBCxiug probabilistic verbose z
To perform and get the corresponding results (don't pay attention to the second command, it is called a case called nessus software calculation)
I put the above two commands written to the file. TXT,
#!/bin/sh
Sed -i "s/` cat TBCxiug dat | awk '{print $2}' | awk 'NR 74=={print}' `/` cat a.t xt | awk '{print $2}' | awk 'NR==1 {print}' `/g" TBCxiug. Dat
/opt/software/.../nessus/opt/software/.../license. TXT/home/.../TBCxiug probabilistic verbose z
And chmod + x file. TXT into executable,./file. TXT after the operation, an error is as follows:
/opt/software/NESSUS - 9.5/bin/Linux/NESSUS: No to the file or directory
Sed: can 't read/home/xiaoyq/Desktop/NESSUS_Temp/TBCxiug: No to the file or directory
Sed: can 't read probabilistic: No to the file or directory
Sed: can 't read verbose: No to the file or directory
Sed: can 't read z: No to the file or directory
To analysis the reason, for solving
CodePudding user response:
Sed to not find a file or directory, do you see the path problem, it is best to use the absolute path to the fileCodePudding user response: