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
Disabling software restriction policy
Error
How to do SQL search with LIKE and ignore special characters?
"File Helper" reporting - Your system may have upopenable files - Why?
OWA Setup
OMA and OWA
Joomla site blank after upgrade
ReportViewer break pages
How to view .stp or .wsp files in Microsoft Office sharepoint designer mode
call .rdl with store procedure with parameter