Search Results

Search: Posts Made By: Mid Ocean
1,165
Posted By Don Cragun
The RE [A-z] also includes the characters [, \,...
The RE [A-z] also includes the characters [, \, ], ^, _, and `. The RE [[:space:]] contains all whitespace characters; I'm guessing that you just want a space character instead. And, if you're...
5,916
Posted By RudiC
Without modifying the shell...
Without modifying the shell variable:name="Matthew Lewis (writer)"
awk -v na="$name" 'BEGIN {gsub(/\(|\)/,"\\\&", na)} $0 ~ na' file.txt
Matthew Lewis (writer)
Showing results 1 to 2 of 2

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