Write a script named killdup. The script sorts all the lines in a file supplied to it as the first argument, and removes duplicate lines. The script stores the resulting output in a file whose name is given by the second argument.
I know how to sort it, but how to use the file as argument and then pass it to another file, which is also an argument.
sort -n | uniq -u | sort -n
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.