Questions tagged as 'sed'

2
answers

Remove all line breaks from only one column of a csv file on Linux

I have a csv file with more than 500k of rows and need to remove row breaks from just one column in an efficient way besides exclude all the links that contain it, an excerpt from the file: "created_at","text","location","name","screen_...
asked by 07.03.2017 / 01:08
1
answer

How to change the Cartesian coordinates of files, in an automated way

I have a certain folder with several files, and these in turn, contains in its interior description of Cartesian X and Y coordinate points. However, I want to replace these points automatically and dynamically, ie use while to run all...
asked by 18.06.2017 / 15:08
2
answers

Insert string in first column

I'm breaking my head with something very simple, I need to insert a ";" (semicolon) after a sort / uniq in a file. As the number of repeated rows returns, I need this return that is always in the first column to be inserted this ";". I already s...
asked by 03.03.2017 / 20:32
3
answers

Remove specific line of files in linux [closed]

I need to remove a particular line in a file crontab ex: * * * * * root /home/linaro/funcao1.sh * * * * * root /home/linaro/funcao3.sh * * * * * root /home/linaro/funcao4.sh * * * * * root /home/linaro/funcao5.sh I would like to dele...
asked by 07.11.2018 / 18:40
2
answers

Replace "[" with [using thirst

I'm trying to correct some formatting errors in a file and I have as input: "[""teste""]" And I wanted to get an output like this: ["teste"] I already tried this command but it gives me error: sed -i s/"["/[/g *.csv sed -i s/"]"/]/g...
asked by 25.10.2017 / 18:59
2
answers

Linux - Edit multiple files using another file as source

I have a file (listname.txt) with multiple names, one per line. I need to edit or remove all names that are in listanome.txt from various other files With grep I guess which files should be dictated, but are many. grep -Ff lista...
asked by 18.07.2018 / 20:03
2
answers

Append .html extension to the end of all links in multiple files (with Shell Script)

Hello. I have a lot of HTML files that have links in the following format: http://localhost:8080/tag:alguma_coisa and I need to add the .html extension to these links so they look like this: http://localhost:8080/tag:alguma_c...
asked by 13.05.2018 / 19:10
1
answer

Delete words from a file

I have a file CSV and I have this list of words here: link The CSV file has 3 columns, Text, user.name, and Class, and has about 100K of rows. I need to exclude from the first column of CSV all the words that appear in...
asked by 02.04.2017 / 19:25
1
answer

Substitution with thirst

I have to make substitution in some files and I can not write an expression that works. I have this text at the beginning of each line:    NF3-9-16S_S9_1456 | M02255: 210: 000000000-B9K3P: 1: 1101: 14397: 18152 1: N: 0: 9 | o: 50 | m / o: 0.7...
asked by 22.08.2017 / 10:43
2
answers

Filter number of characters with SED or grep

I have a file with strings I need at first to filter for example only rows that have 5 characters And secondly filter only those that have at least 2 characters repeated together Example: Display aazyx or zyaax but does not display azyxa And thi...
asked by 22.11.2017 / 00:47