Ambil 100 line teratas pada text file

#!/bin/bash
# Target directory
TARGET=COPY

for i in $(find . -iname *.txt)
    do
        mkdir -p "$TARGET/$(dirname ${i:2})"
        head -100 $i > "$TARGET/${i:2}"
    done

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.