Reputation: 21
Remove substring in a file using sed
command in shell
Eg.
cat TR
SAM9001,SAM9002,SAM9005
**Output:**
9001,9002,9005
Upvotes: 0
Views: 384
Reputation: 407
using grep:
grep -o "[0-9]*" TR
Add | paste -sd,
to make it comma-separated.
Upvotes: 0