- May
- 12,663
- 157
I just discovered these today.
1. Win10's SORT.EXE has an uncocumented "/case" option to make it case-sensitive
2. Win10's SORT.EXE has an undocumented "/unique" option to make it remove duplicate lines (line UNIX's 'sort -u' or 'sort | uniq')
3. Piping to FIND.EXE /c /v "" will give you a line count (like UNIX's 'wc -l')
1. Win10's SORT.EXE has an uncocumented "/case" option to make it case-sensitive
Code:
d:\data\tcclibrary> (echo b^r^nB^r^nA^r^Na) | sort
A
a
b
B
d:\data\tcclibrary> (echo b^r^nB^r^nA^r^Na) | sort /case
a
A
b
B
2. Win10's SORT.EXE has an undocumented "/unique" option to make it remove duplicate lines (line UNIX's 'sort -u' or 'sort | uniq')
Code:
d:\data\tcclibrary> (echo 1^r^n2^r^n1^r^n2) | sort
1
1
2
2
d:\data\tcclibrary> (echo 1^r^n2^r^n1^r^n2) | sort /unique
1
2
3. Piping to FIND.EXE /c /v "" will give you a line count (like UNIX's 'wc -l')
Code:
d:\data\tcclibrary> (echo 1^r^n2^r^n1^r^n2) | find /c /v ""
4