[CS-FSLUG] Shell Scripting A Solution to Network Monitoring

Robert W. robertwo at access-4-free.com
Mon Aug 2 20:39:22 CDT 2004


On 08/02/2004 07:45:50 AM, Josiah Ritchie wrote:
> OOhh... I figured there was a cleaner way of doing this.
> 
> What does gsub("[;\"]", "", host) do?
>

'gsub' removes all of the semi-colons and quotation marks from the  
string.  Technically, it replaces anything that mathces the first  
regular expression (semi-colon or quotation mark) with the second  
string (null).  That command took the place of 'tr -d "\""|tr -d ";"'  
in the shell command line.

--
Robert W.
robertwo at access-4-free.com

Who of you by worrying can add a single
hour to his life? -- Matthew 6:27




More information about the Christiansource mailing list