filenames - How to use wildcard in the middle on the string? bash -
i writing bash script
my files like: file="${nodeid}_00000_19700101010${ts}_udp_filtered.pcap"
. possible instead of 00000
utilize 5digit number? thought using
file="${nodeid}_
*_19700101010${ts}_udp_filtered.pcap"
sometimes have 00001, 00004, etc.
something like
echo "${nodeid}"_[0-9][0-9][0-9][0-9][0-9]_19700101010"${ts}"_udp_filtered.pcap
note, *
, [something]
won't expand in quotes, variables quoted above.
bash filenames
No comments:
Post a Comment