Search Results

Search: Posts Made By: Shaan_Shaan
1,598
Posted By Shaan_Shaan
Thanks. /.+\..+\..+\..+/ instead of ...
Thanks. /.+\..+\..+\..+/ instead of /...\....\....\..../ works, but that does not copy other text from existing.txt. it only captures IP.

But somehow, my existing code started working as Pamu...
1,598
Posted By Shaan_Shaan
awk to substitute ip without zero left padding
Hello All,

I have this script to awk IP to new file.

#awk '/myip|yourip/ {sub(/...\....\....\..../, newip)}1' newip=$IP existing.txt > new.txt

When existing.txt has myip=192.168.123.123 and...
1,425
Posted By Shaan_Shaan
Crontab does not execute script within a script
Hello All,

I have a crontab schedule and its executing a script that is calling another script and does not execute.

Crontab : ***** /test.sh

and in test.sh
/usr/local/file.sh

and in...
1,719
Posted By Shaan_Shaan
Thank you. The config file is bit long though. I...
Thank you. The config file is bit long though. I have no clue how to replace 112.121.107.100 with new IP in two places.

webproxy -l 112.121.107.100 -s udp:127.0.0.1:9722 -F -L 501 -m 51001 -M...
1,719
Posted By Shaan_Shaan
Thank you. This is how Crontab looks like and I...
Thank you. This is how Crontab looks like and I have added the last line. Is this correct?
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root...
1,719
Posted By Shaan_Shaan
Script to write result to a file
Hello,

How can I run this script every 1 hour and save its result to result.txt
ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'

Regards
Shaan
4,115
Posted By Shaan_Shaan
Here's the config file. Wherever "PublicIP"...
Here's the config file. Wherever "PublicIP" appears, I need the ppp0 ip to be updated and save the file. I already have a "Start Service" and "Stop Service" script ready. So only difficulty is how to...
4,115
Posted By Shaan_Shaan
CentOS 5.5 Thank you. Shaan
CentOS 5.5

Thank you.
Shaan
4,115
Posted By Shaan_Shaan
Script to detect dynamic ip change and update to config file
Hi All,

I am newbie here and request your assistance.

I have a service running on public ip, but since I have a dynamic IP it keeps on changing and every time I need to manually get the new ip...
Showing results 1 to 9 of 9

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