Create list of all .sh files in current folder.Check first line of each file in this list andif file starts with #!/bin/sh then replace thatwith #!/bin/bash. Only modify filesthat have #!/bin/sh, do not blindly replacefirst line of all .sh files with #!/bin/bash.Also the replacement needs to be doneonly to starting sequence.If file has #!/bin/sh somewhere in betweendo not replace that. You do not have to searchfor .sh recursively in sub-folders,do replacement only in files in current folder.
replace the the first line of all .sh files in a folder
bash;shell;shell script