Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. find . -name "text*.txt" -type f -print0 | xargs -0 -I{} sh -c 'f="{}"; head -100 "$f" > "${f%.txt}_new.txt"'
  2.  
  3. for f in *.txt
  4. do
  5. head -n100 "$f" > "${f%.txt}_new.txt"
  6. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement