What am I doing wrong, sort and remove dups

None-yet

Member
Credits
576
Someone , anyone, help! lol

I have a file to sort and remove dups. I am using cat sort -u unsorted.txt and I think that is correct but as per below I must be doing something wrong. I know I am a bit rusty but what am I doing wrong?
[email protected]:~/Desktop# cat sort -u unsorted.txt
cat: sort: No such file or directory
cat: unsorted.txt: No such file or directory
[email protected]:~/Desktop#


Thanks
 


f33dm3bits

Gold Member
Gold Supporter
Credits
3,487
Someone , anyone, help! lol

I have a file to sort and remove dups. I am using cat sort -u unsorted.txt and I think that is correct but as per below I must be doing something wrong. I know I am a bit rusty but what am I doing wrong?
[email protected]:~/Desktop# cat sort -u unsorted.txt
cat: sort: No such file or directory
cat: unsorted.txt: No such file or directory
[email protected]:~/Desktop#


Thanks
You don't need to cat the file in order to sort it, you can just use sort alone on the file your want to sort. The file unsorted.txt isn't located in the Desktop directory, you probably saved the file to a different directory. Try to find it like this:
Code:
find /home/username -name unsorted.txt
Replacing username with your user, which you used to log into the system.
 
Last edited:

f33dm3bits

Gold Member
Gold Supporter
Credits
3,487
Yeah, the file is on the desktop. That's part of what I didn't understand. I tried with and without cat and neither worked.

Lost my other computer in a tornado earlier this year here in Chattanooga. Did a "Don't remember my password" but got no return on the email. Thought I may have used a long lost email.
Right now cat thinks sort(which doesn't exist) is a file. Seems unsorted.txt isn't seen as well, that is strange.
 
Last edited:

None-yet

Member
Credits
576
[email protected]:~/Desktop# cat sort -u unsorted.txt
cat: sort: No such file or directory
cat: unsorted.txt: No such file or directory
[email protected]:~/Desktop# ls -i
11541716 prerelease 11541713 unsoted.txt
[email protected]:~/Desktop#

That makes me so mad. As soon as I saw it come up I saw I had misspelled it. Stop laughing. Dad-gum that burns me. Like I said I am rusty.

One last thing. Before I mess up again, what would be the correct syntax to sort > remove dups > output to another file?
 


Members online


Top