#!/bin/bash
## one possible method to find all of the columns that start with period ##
cat $1 | cut -d"|" -f2 | grep '^\.' > badrecords.txt
## another possible method
cat $1 | cut -d"|" -f2 | grep '^\.' > badrecords.txt
## find all records that have a pipe followed by a period
grep '|\.' test1.txt
~
### the quick sed command to make global switches ##
:.,$s/|/,|g ## translates all pipes to comas
:.,$s/,/|/g ## translates all comas to pipes:w
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment