grazinggoat2
Systems Engineer
Hello,
why cant i get this to work in my bash script? I have multiple files with the same name but different file extension.
example
batch.prd
batch.uat
batch.dev
_filename="repo/batch"
seek=$(grep "job name_A" "$_filename*" |sort -u)
I've tried "$_filename.*" and "$_filename./*" but bash will not expand the filenames for the grep to do a once over and i prefer not writing a loop to go thru each file. Any thoughts as I'm just not sure how to expand a filename with extensions
Thanks in advance!
why cant i get this to work in my bash script? I have multiple files with the same name but different file extension.
example
batch.prd
batch.uat
batch.dev
_filename="repo/batch"
seek=$(grep "job name_A" "$_filename*" |sort -u)
I've tried "$_filename.*" and "$_filename./*" but bash will not expand the filenames for the grep to do a once over and i prefer not writing a loop to go thru each file. Any thoughts as I'm just not sure how to expand a filename with extensions
Thanks in advance!