You can sort
then uniq
:
$ sort -u input.txt
Or use awk
:
$ awk '!a[$0]++' input.txt
More Related Contents:
- Expansion of variables inside single quotes in a command in Bash
- Reading quoted/escaped arguments correctly from a string
- Can a shell script set environment variables of the calling shell? [duplicate]
- How to add a progress bar to a shell script?
- What is the purpose of “&&” in a shell command?
- How can I remove the extension of a filename in a shell script?
- sudo echo “something” >> /etc/privilegedFile doesn’t work [duplicate]
- While-loop subshell dilemma in Bash
- How do I escape the wildcard/asterisk character in bash?
- How do I grab an INI value within a shell script?
- How to create a cron job using Bash automatically without the interactive editor?
- How can I count all the lines of code in a directory recursively?
- How does Ctrl-C terminate a child process?
- Running multiple commands in one line in shell
- Division in script and floating-point
- Copy folder recursively, excluding some folders
- Variable interpolation in the shell
- How to remove filename prefix with a Posix shell
- How to pipe multiple commands into a single command in the shell? (sh, bash, …)
- What does ” 2>&1 ” mean?
- How do I read user input into a variable in Bash?
- Why do I get “/bin/sh: Argument list too long” when passing quoted arguments?
- Count number of lines in a git repository
- How do I check if a directory exists or not in a Bash shell script?
- shell script respond to keypress
- Temporarily change current working directory in bash to run a command [duplicate]
- How to break out of a loop in Bash?
- How to tell if a string is not defined in a Bash shell script
- BASH: Writing a Script to Recursively Travel a Directory of N Levels
- How to grep for case insensitive string in a file?