Hello,
I am new to shell scripting, need help,
my requirement is to delete the ip address from serveral files,
please suggest
Hello,
I am new to shell scripting, need help,
my requirement is to delete the ip address from serveral files,
please suggest
Hello manoj.solaris,
Without showing us and sample Input_file and expected output it is nearly impossible to provide any solution. So based on few assumptions, could you please try following and let me know if this helps you.
awk '{gsub(/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/,"");print}' Input_file
Also your name suggests solaris :), so on a Solaris/SunOS system, change awk
to /usr/xpg4/bin/awk
, /usr/xpg6/bin/awk
, or nawk
If above doesn't satisfy your requirements then kindly do let us know proper sample Input_file(in code tags like above) and sample output too(in code tags please).
Thanks,
R. Singh
Being a member for more than 10 years, and with more than 250 posts, I'd expect you at least have some idea on how to proceed, so please share; AND I'd expect you were familiar with this forum's golden rules (as already alluded to by RavinderSingh13):
Please become accustomed to provide decent context info of your problem.
It is always helpful to support a request with system info like OS and shell, related environment (variables, options), preferred tools, adequate (representative) sample input and desired output data and the logics connecting the two, and, if existent, system (error) messages verbatim, to avoid ambiguities and keep people from guessing.