Created
November 22, 2013 05:57
-
-
Save eamexicano/7595496 to your computer and use it in GitHub Desktop.
Remove carriage return from windows file and create new file. Exclude some files (from a directory) and concatenate into a one big file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Remove carriage return from windows file <CR> and createa a new file | |
tr -d '\015' < windows_file > another_file | |
# Exclude some files prior concatenation | |
ls | sort | grep -v -E "(file1|file2|...|fileN)" | xargs cat > large_file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment