a='hello world
hello world
hello world
hello world
hello world ad a a t t hello'
n=0
> result.txt
for word in $a
do
wcount=$(echo $a| grep -o $word | wc -l)
echo "$word : $wcount" >> result.txt
done
cat result.txt | uniq
Day: June 17, 2021
recover files in linux using xfs_undelete and dd
yum install expect tcl tcllib
dd if=/dev/sda | ssh USERNAME@IP_ADDR dd of=sda.iso
xfs_undelete sda.iso
More :
https://github.com/ianka/xfs_undelete
https://unix.stackexchange.com/questions/132797/how-to-dd-a-remote-disk-using-ssh-on-local-machine-and-save-to-a-local-disk