RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

uniq

Article Index
1. Name
2. Synopsis
3. Frequently used options
4. Examples

1. Name

uniq [man page] - report or omit repeated lines

2. Synopsis

uniq [OPTION]... [INPUT [OUTPUT]] 

3. Frequently used options

-i, --ignore-case
ignore differences in case when comparing
-u, --unique
only print unique lines

4. Examples

Suppose we have a file with content:
$ echo -e "a\nb\nA\nc\nd\nc\nE\ne" > file 
uniq - example file
unig command will print only unique lines within file: NOTE: Only consecutive lines counts as NOT unique.
$ uniq file 
only consecutive lines counts as NOT unique
Ignore differences in case when comparing a file:
$ uniq -i file 
uniq - ignore differences in case

Share this linux post:

Submit uniq in Delicious Submit uniq in Digg Submit uniq in FaceBook Submit uniq in Google Bookmarks Submit uniq in Stumbleupon Submit uniq in Technorati Submit uniq in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download