↧
Answer by αғsнιη for Extracting String between given token
Using grep as you mentioned you "have %string% simply present":grep -o '%[^%]*%' infile
View ArticleAnswer by okcomputer_kid for Extracting String between given token
Try this. sed -r 's/[^%]*%([^%]*)%\S*(\s)*/\1\2/g'Its easy to extract for single occurence using sed. For multiple occurences, I had found something like this before for similar problem. I couldn't...
View ArticleAnswer by Kartik Sabharwal for Extracting String between given token
If all the lines in the file will be structured like the example, I believe you can use the command line program cut to treat the percent signs as field delimiters and pick the 2nd and 4th fields. So...
View ArticleExtracting String between given token
I want to extract string between given token from a file, in my case it is between %. I have highlighted the strings in Bold below.Content:Update DIMENSIONPARAMETER set...
View Article