I have a list that i've copy and i want to paste it to the shell to give me just the repeated lines.
As i read about bash commands i've maded this:
cat > /tmp/sortme ; diff <(sort /tmp/sortme) <(sort -u /tmp/sortme)
When i write the above command i paste my list and press
CTRL+Z to stop cat and it shows me the repeated lines. I don't want to compare files, just pasted input of several rows.
Now to the question:
Is there any way to turn that command into script? Because when i try to make it as a script and
CTRL+Z stops it.
PS: Please don't laugh. This is my firs time trying. Till now just reading. :)