How to print only the unique lines in BASH?

Use sort and uniq: sort inputfile | uniq -u The -u option would cause uniq to print only unique lines. Quoting from man uniq: -u, –unique only print unique lines For your input, it’d produce: eagle forest Obs: Remember to sort before uniq -u because uniq operates on adjacent lines. So what uniq -u actually … Read more

Sort & uniq in Linux shell

Using sort -u does less I/O than sort | uniq, but the end result is the same. In particular, if the file is big enough that sort has to create intermediate files, there’s a decent chance that sort -u will use slightly fewer or slightly smaller intermediate files as it could eliminate duplicates as it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)