Category "sed"

Flutter -ios - pod install gRPC-C++ sed ssl issue

I have been running through this issue when I do pod install in my flutter project. (I'm going to answer this myself as I reached the solution after couple of h

sed replacing first occurence of characters in each line of file only if they are first 2 characters

Is it possible using sed to replace the first occurrence of a character or substring in line of file only if it is the first 2 characters in the line? For examp

Sed: specific exact two match

I have this line in a file. The blanks between the words can be tabs or spaces #define FN_AUTO_FN_FNSECTOR Function(2) /* FN_ comment*/ and I wanted outp

batch rename matching files using 1st field to replace and 2nd as search criteria

I have a very large selection of files eg. foo_de.vtt, foo_en.vtt, foo_es.vtt, foo_fr.vtt, foo_pt.vtt, baa_de.vtt, baa_en.vtt, baa_es.vtt, baa_fr.vtt, baa_pt.vt

escaping newlines in sed replacement string

Here are my attempts to replace a b character with a newline using sed while running bash $> echo 'abc' | sed 's/b/\n/' anc no, that's not it $> echo

Parse Text with "awk" and Modify One Of The Columns With "sed"

I have a data seperated with pipe "|" and I would like to parse it with awk and write it into a DB. EndpointRequest|ID-ip-172-31-70-119-eu-west-1-compute-intern

Mathematica : Convert easily a Notebook format into Wolframscript (.wls) by removing all comments on real instructions lines

I have a Mathematica notebook. I would like to generate in an automatically way this notebook to a Wolfram script that I could make run directly from terminal u

How to make regex works with perl command and extract numbers from a file?

I'm trying to extract from a tab delimited file a number that i need to store in a variable. I'm approaching the problem with a regex that thanks to some resear

sed replace backslash double quote with single quote

I would like to take the following: echo "'{\"apiVersion\":\"apps/v1\", \"kind\":\"two\"}'" And end up with the following via using SED: {'apiVersion':'apps/v1

use sed to replace version number in a package.json file

This is a part of my package.json file { "name": "org-team-module", "version": "1.1.0-snapshot", "description": "Some description", "scripts": {

Extract a string between double quotes from the 6th line of a file in Unix and assign it to variable

Newbie to unix/shell/bash. I have a file name CellSite whose 6th line is as below: btsName = "RV74XC038", I want to extract the string from 6th line that i

select subdomains using print command

cat a.txt a.b.c.d.e.google.com x.y.z.google.com rev a.txt | awk -F. '{print $2,$3}' | rev This is showing: e google x google But I want this output a.b.c.d.e

Convert sed command from linux to freebsd / macos

I have a very small script that someone here helped me with. It deletes all tracks that are under 1000bits. Works great under linux. Works as well under freebsd

Iterate over a csv and change the values of a column that meets a condition

I have to use bash to iterate over a CSV file and replace the values of a column that meets a condition. Finally, the results have to be stored in an output fil

jq replace part of value in json

I need to replace part of a value from a json output. I could easily do this using sed -i however it would also replace other parts of the file I don't want it

Change indented multiline string in file in terminal

i want to change multiline string within particular marks that is indented in file, example looks like this: non_important_array: [ text ], impo

Tool sed-like to insert a HTML snippet code (a div block) after a <div id="jsn-page">...</div>

I am looking for a way to insert a block <div id="jsn-content-bottom">...code...</div> after a block <div id="jsn-body">...</div>. I wan

Extract string between combination of words and characters [duplicate]

I would like to keep the strings between (FROM and as), and (From and newline character). Input: FROM some_registry as registry1 FROM another_

Replace same occurrence of word with different words using sed

I want to replace 2 same words in file(app.properties) with 2 different words using sed command. Example: mysql.host=<<CHANGE_ME>> mysql.username=te

Count 3 types of delimiters (comma, semicolon, pipe) from different files

I am trying to develop the similar thing. But my requirement is little bit different. I would like to count the number of delimiters in the 1st row and the 2nd