Answered Questions

  • Shell script

    You have current directory containing set of directories which contain files.One file can reside in many directories.Write script which returns number of unique file names inall the subdirectories of a current dir.

    Sathish Krishnan Venkatachalam

    • Aug 7th, 2020

    Ls -lR | awk /^-/ {print $NF} | uniq

    sonu

    • Mar 1st, 2018

    Find . -type f | awk -F / { print $NF } | sort | uniq -c