Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
2 answers
350 views

I have two text files 1.txt and 2.txt that contain two tab separated columns. The first column of both files consists of tokenized text. In both files, the first column is the same. The word order ...
winety's user avatar
  • 3
2 votes
3 answers
609 views

I have this this String 22<>22 And i have this list test dev too The output should be like 22test22 22dev22 etc.. This is the commands i use for do that cat list | sed 's/$/22/g' | sed 's/^/...
Notme's user avatar
  • 83
0 votes
2 answers
266 views

The desired work to find a string, and replace to another (all occurrencies), and rewrite/update the file too. The file is an pbxproj file. I linked a sample of this file sample of the file (please ...
nszmmp's user avatar
  • 13
0 votes
1 answer
212 views

I have a hierarchy of files and two words: word1 and word2. In this hierarchy of files, some of them can contain word1. I want to replace every occurrence of word1 with word2. It is possible using a ...
Fredi's user avatar
  • 79
2 votes
2 answers
5k views

I have several scripts that edit template text files, by removing a "tag" and replacing it with e.g. a number. To do this I use the sed -i command. However, I have an issue with write/read ...
a20's user avatar
  • 143
1 vote
1 answer
271 views

We are using some outdated encoded script which does not to be allowed to be modified. Therefor I though of a solution to modify the input automatically by using sed. This didn't work and after ...
Joanne's user avatar
  • 135
0 votes
1 answer
824 views

I have one sql file on which I'm doing cat and assigning to a variable say "SQL". I have different DATABASES and different TABLES in sql file. I'm trying to replace those tables and databases value ...
sam's user avatar
  • 191
0 votes
1 answer
2k views

I tried using bbe as below bbe -e 's/01110011/01111000/' test.txt All I'm trying to accomplish in this example is to read the file as if it's a binary file, and replacing the letter s with x. I'm ...
Andrew Wei's user avatar
0 votes
2 answers
82 views

I would like replace below input about storage disk to an output in below presented format: Below script is almost working for me. But it doesn't work for T0. It seems is there problem with proper ...
Mac's user avatar
  • 53
1 vote
0 answers
62 views

How do I go about replacing one character for another and then another character for another in one line and printing the result? As an example, consider the following code: string="1 33 4 a" echo ${...
2r3plac3's user avatar
0 votes
3 answers
115 views

I have a file: property(Address1, 4.5) property(Address2, 2.2) property(Address3, 9.0) property(Address4, 3.4) --- I want to replace the floating points based on some conditions (For example: if the ...
Coder's user avatar
  • 179
6 votes
1 answer
3k views

I'm making a function with a replacement of strings using regular expressions in a secure way, without possibility to inject characters, and without renouncing the use of regular expressions: #! /bin/...
Emmett Brown's user avatar
0 votes
5 answers
5k views

I read the current ip address with following command line. after then i need to replace the last value with 0/24 For example. The current ip ist 192.168.178.1 and i need to replace the var value in ...
mikeeyy's user avatar
-2 votes
1 answer
2k views

I am trying to replace string with a sentence or paragraph contacting multiple newline characters using shell script. Replacement string will be generated run-time. eg: sed /string_to_be_replaced/...
naveen sharma's user avatar
0 votes
2 answers
116 views

I have some categories and their values: Category: Value: 1*4 15.934934 1*5*3 19.281281 1*8*10*2 78.20912 I would like to replace the categories by numbers that represent the ...
Stellamaris Sotomayor's user avatar

15 30 50 per page