Snippets

Firoj Alam find the common entries by bash from two different files

Created by Firoj Alam
1
2
3
4
# find the common entries from both files.
grep -F -f exb_trans_files_uniq.txt a4e_meta.txt |sort -nk1 >a4e_meta_empathy.txt
### Rename file names. replace space with underscore 
find . -depth -name '* *' \ | while IFS= read -r f ; do mv -i "$f" "$(dirname "$f")/$(basename "$f"|tr ' ' _)" ; done

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.