Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rad# ; ID_KEY ; UNIT_ID
- 1 ; 30000000004 ; 8417920
- 2 ; 30000000004 ; 8170811
- ︙
- 10 ; 30000000004 ; 1581292
- ︙
- 1001 ; 3000000000 ; 8285052
- 30000000004,8417920,DATABASE
- 30000000004,8170811,DATABASE
- awk -F';' 'BEGIN{OFS=",";} NR>1{gsub(/ /,""); print $2,$3,"DATABASES"}' filename | sed -e :a -e '$!N;s/n/,/;ta'
- 1d
- awk '{ FS=";"; OFS=","; gsub(/^[ t]+/, "", $2); gsub(/[ t]+$/, "", $2); gsub(/^[ t]+/, "", $3); gsub(/[ t]+$/, "", $3); } NR > 1 { print $2, $3, "DATABASE" }' file
- cut -d' ' -f3,5 <infile |
- sed -n 'y/ /,/;1!s/$/,DATABASE/p'
Add Comment
Please, Sign In to add comment