for any file (
$job_name) the last line from any number of lines (
I would like to delete it.
We have assigned the following variables:
の The results of the run do not match your wishes.
As a result of the investigation, I am wondering if there is a problem with the
I don't know the answer.変数 I think there is a problem with how to specify variables.
One site said '' was unnecessary.However, the execution did not delete the specified line.
Please let me know.Thank you for your cooperation.sed
$row_number will be interpreted by shell and
$d is surrounded by
' and is not interpreted by shell.
In addition, the above method will output the results to the standard output.If you want to rewrite the file you specified for
$job_name, you can add
If you rewrite it, it will not be restored, so please be careful.
Is it like this?
-i option if you prefer it.
© 2022 OneMinuteCode. All rights reserved.