sqlcmd somecommand | sed '1,2d; /^$/ d; /^\(.* rows affected\)/ d; s/ *$//'That'll delete the first two lines, delete empty lines, delete "rows affected" lines, and trim out ending whitespace! And from vim:
:sort uSort and keep only unique lines. Beautimus!
No comments:
Post a Comment