Last active
September 24, 2020 16:58
-
-
Save megpay/add933716a5907c4c7b4d05597a6ec82 to your computer and use it in GitHub Desktop.
Useful sed commands
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/sh | |
# Where I am storing useful sed commands for later use. | |
# Removing characters from a csv or text file. This removes a double-quote. | |
sed 's/"//g' filename.csv | |
sed 's/"//g' filename.csv > filename_new.csv | |
# Not sed, but using cut to remove columns of a csv file. | |
# This takes a pipe-delimited file and removes columns 2, 3, and 4. | |
cut -d '|' -f2-4 filename.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment