Reputation:
Is it possible to resave the running bash script?
I am running a loop in the bash file to do certain operations. After the execution of operations are completed, I want to resave the current bash file without adding any extra code. I just want the file last modified date to be changed.
Current code run.sh looks something like
#!/bin/bash
FILES=/home/shell/test/*
for f in $FILES
do
if [[ "$f" != *\.* ]]
then
DO STUFF
fi
done
After done, I want run.sh to have current date and possible to do this internally?
Upvotes: 1
Views: 140