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
mkdir -p ~/.scripts && cat << 'EOF' > ~/.scripts/csv_splitter.sh | |
#!/bin/bash | |
# Check if a filename was provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 filename.csv [maxrows]" | |
exit 1 | |
fi | |
# Input file from argument |
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
# I recommend commenting out the `Rename-Item` line and testing, before you actually bulk rename anything | |
# Recurse from the active directory | |
Get-ChildItem '.' -Recurse | ForEach-Object { | |
# Don't rename folders, just files | |
if ($_ -is [System.IO.FileInfo]) { | |
# The original filepath (full path) | |
$oldpath = $_.FullName |
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
This is a "privacy policy" for use in testing & development apps. | |
If you arrived here from an app in the real world, that is probably a mistake: please let the app developer know. |