You probably want
`history -100`
on OS X, anyway, the default only gives 15 or so commands in history
`history -100`
on OS X, anyway, the default only gives 15 or so commands in history
I use the awkscript below to compact it:
# histsort.awk --- compact a shell history file # Thanks to Byron Rakitzis for the general idea
{
if (data[$0]++ == 0)
lines[++count] = $0
}
END {
for (i = 1; i <= count; i++)
print lines[i]
}