Hirdetés

2024. május 3., péntek

Gyorskeresés

Hozzászólások

(#1796) Jester01 válasza Nefri (#1795) üzenetére


Jester01
veterán

find + ciklus

#!/bin/bash
actday=$(date +"%u")
acthour=$(date +"%k")
find /root/autoscan/objects -type f -name \*.txt |
while read file
do
fileday=$(sed -n 3p "$file")
filehour=$(sed -n 5p "$file")
if [ $actday -eq $fileday ]
then
echo "egyezik"
# tovabbi tennivalok itt
fi
done

Jester

Copyright © 2000-2024 PROHARDVER Informatikai Kft.