1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-04 13:49:03 -08:00
rc/sh/similar

14 lines
261 B
Text
Raw Normal View History

2013-06-28 05:22:14 -07:00
#!/bin/sh
awk '
{
i=0
split($0,a,"")
split(L,b,"")
for (c in a)
if (a[c]==b[c]) i++
else break
2018-02-20 02:55:45 -08:00
#print substr($0,1,i) "\033[7m" substr($0,i+1) "\033[0m"
print "\033[31m" substr($0,1,i) "\033[0m" substr($0,i+1)
2013-06-28 05:22:14 -07:00
L=$0
}'