Search Results

Search: Posts Made By: alexzubin
3,884
Posted By alexzubin
Same problem. For some reason, sed...
Same problem.
For some reason,

sed 's/^[pP][rR][iI][nN][tT]/#print/' <filename>

is not commenting when the ‘print' statement starts with a tab/space (See the second encircled code.)

Can...
3,884
Posted By alexzubin
For some reason the above code does not seem to...
For some reason the above code does not seem to work.

This is my code:

<--START

a = "This is a print statement
print a
b = "This contains print statement"
print b
...
3,884
Posted By alexzubin
Replace only if the keyword is the first word in every line
How do I replace only if the keyword is at the begining of a line?
Code:
--
a = “This is a print statement”
print a
--
What if I want to replace print by #print only in the second line i.e...
4,187
Posted By alexzubin
SED syntax to replace keyword only if it occurs at the start
How do I replace only if the keyword is at the begining of a line?
Code:
--
a = “This is a print statement”
print a
--
What if I want to replace print by #print only in the second line i.e...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 12:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy