All Questions
3 questions
1
vote
5
answers
1k
views
Replace hyphen(s) with underscore(s) within angle brackets in a file
I’m aware of how to replace string;
e.g., replace hyphen with underscore in a file.
However, I wish to replace all hyphens with underscore
for all text that falls within angle brackets in a given file....
2
votes
3
answers
585
views
Conditionally replace lines of file1 with the corresponding lines of file2
For example, I have two files:
file1:
1
4
X
5
X
7
file2:
2
3
5
X
X
1
I want to replace X-lines of file1 with whatever is in file2 on the corresponding line:
result:
1
4
5
5
X
7
I prefer the ...
0
votes
1
answer
798
views
Replacing one column with another column in csv files [duplicate]
I have a file1 with the following:
1,joe,jim,bob,sally,mark,sue,etc,etc
2,julie,barbra,joe,jim,bob,sally,mark,sue,etc,etc
1,clarie,mike,joe,jim,bob,sally,,etc,etc
2,matt,alivia,joe,jim,bob,mark,sue,...