1
I am running this command to remove repeated lines from a file:
cat arquivo.csv | (read;echo "$REPLY"; sort) | uniq > arquivo.csv
But when I look at the file, it’s blank instead of just the lines that don’t repeat. What I’m doing wrong?
1
I am running this command to remove repeated lines from a file:
cat arquivo.csv | (read;echo "$REPLY"; sort) | uniq > arquivo.csv
But when I look at the file, it’s blank instead of just the lines that don’t repeat. What I’m doing wrong?
0
You can use the command:
cat arquivo.csv | sort | uniq > novoArquivo.csv
0
You can do this using apernas the Sort.
sort -u arquivo.csv -o arquivo.csv
-u
will remove duplicate lines-o
will send the output to the.csv fileBrowser other questions tagged bash shell-script
You are not signed in. Login or sign up in order to post.
I’ve always used the
cat
|sort
|uniq
>novo_nome
, If it is with the same name it is without content, now I do not remember what was the explanation for this– Denis Rudnei de Souza