SyntaxFix
Write A Post
Hire A Developer
Questions
🔍
[regex] How to replace a whole line with sed?
Home
Question
How to replace a whole line with sed?
Try this:
sed "s/aaa=.*/aaa=xxx/g"
Examples related to
regex
•
Why my regexp for hyphenated words doesn't work?
•
grep's at sign caught as whitespace
•
Preg_match backtrack error
•
regex match any single character (one character only)
•
re.sub erroring with "Expected string or bytes-like object"
•
Only numbers. Input number in React
•
Visual Studio Code Search and Replace with Regular Expressions
•
Strip / trim all strings of a dataframe
•
return string with first match Regex
•
How to capture multiple repeated groups?
Examples related to
sed
•
Retrieve last 100 lines logs
•
How to replace multiple patterns at once with sed?
•
Insert multiple lines into a file after specified pattern using shell script
•
Linux bash script to extract IP address
•
Ansible playbook shell output
•
remove white space from the end of line in linux
•
bash, extract string before a colon
•
invalid command code ., despite escaping periods, using sed
•
RE error: illegal byte sequence on Mac OS X
•
How to use variables in a command in sed?