Из руководства find
:
-mtime n
File's data was last modified n*24 hours ago. See the comments for
-atime to understand how rounding affects the interpretation of
file modification times.
См. также Почему find -mtime +1 возвращает только файлы старше 2 дней?для объяснения поведения округления.
NETID="10 20 30"
NAME="eth1 eth2 eth3"
NETS=$(awk -v name="$NAME" -v netid="$NETID" '
BEGIN {
size=split(name, arr_names);
split(netid, arr_netids);
for(i=1; i <= size; i++) {
printf "%s:%s ", arr_names[i], arr_netids[i];
}
}')
echo "$NETS"
Выход
eth1:10 eth2:20 eth3:30