Microsoft
Software
Hardware
Network
Question : Search and replace script
Hello,
I want to replace all the below given lines in a file to this "%susysprod ALL=(ALL) /bin/su -, /bin/su"
%susysprod, vrao ALL=(ALL) /bin/su -, /bin/su
%suqatest, %susysprod ALL=(ALL) /bin/su -, /bin/su
dapani, %susysprod ALL=(ALL) /bin/su -, /bin/su
%susysprod, manian, urapak, rtlasetti, sadqb, sysadm ALL=(ALL) /bin/su -, /bin/su
%susysprod, snara ALL=(ALL) /bin/su -, /bin/su
Output should be:
%susysprod ALL=(ALL) /bin/su -, /bin/su
%susysprod ALL=(ALL) /bin/su -, /bin/su
%susysprod ALL=(ALL) /bin/su -, /bin/su
%susysprod ALL=(ALL) /bin/su -, /bin/su
%susysprod ALL=(ALL) /bin/su -, /bin/su
Please let me know. Thanks!
Answer : Search and replace script
sed 's#.*%susysprod.*ALL=(ALL)
*/bin/su -, /bin/su#%susysprod ALL=(ALL) /bin/su -, /bin/su#'
Random Solutions
Multiple $(document).ready() jquery conflicting
Vlookup with exact number format
CX600 FLARE 2.05.600.5.007 - upgrade procedure to 2.19?
Setting up exchange
How do I check if a window is already open or give it focus using Flex/Flash
Php concanation text
How convert Windows 7 shadow copies into usable Restore Points like XP?
Add date to MySQL
MS SQL Stored Procedure miscounting number of characters
Custom SQL in Web Intelligence Error