Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.25 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. target='lsd.log'
  4.  
  5. while IFS= read -d $'\0' -r file ; do
  6.     file_list=("${file_list[@]}" "$file")
  7. done < <( find -name "*.txt" -print0)
  8.  
  9. for file in "${file_list[@]}"
  10. do
  11.     cat $file >> $target
  12. done
  13.  
  14. wc $target
  15. tail -n 100 $target
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement