changed ruby line to sed line for parsing ip string