Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
How can I loop through the file starting at the end and going backward one line at a time? Can -tail be used for this? I do not want to read only the last 5 lines because I want to use a more complicated condition than the one above. Instead, I want to read the file backwards, starting at the last line then moving up one line at a time.
#!/bin/bash while read LINE do if [ $(( i )) -lt 5 ]; then i=$((i+1)) echo $LINE else break fi done <"$1"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.