Unix tools like grep, uniq, etc

Has anyone been able to get GPT-3 to emulate familiar Unix tools like uniq, sort, grep? I would like to be able to do things like tell it “remove duplicate lines from the given text.”

1 Like

Lovely idea, i’d like to be part of this. :smiley:

1 Like

It should work with the command “remove duplicate lines from the given text.”

If you don’t want to confuse the model, you can try something like below:

command for remove duplicate lines using sort and save it as new file

then the output:


sort file.txt | uniq > newfile.txt

Or

# find all files in the current directory that contain the word "happy"
grep -lir "happy" *

# read the text.txt and remove duplicate lines and save it as text_unique.txt

Codex Output:

sort text.txt | uniq > text_unique.txt

1 Like