Bash - Remove characters after X
Using bash, remove characters after X via cut
cut -f1
takes first column assuming the delimiter = “comma”.
cat file.txt | cut -f1 -d"," > new.file.txt
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.