regex pattern

I have a line as follows in squid.conf file. My sever is hosted in a cloud:

acl verizonfios src 1.2.3.4

My ISP will force an IP address change every week or two. I would like to replace them with a new IP

acl verizonfios src 4.5.6.7

How do I replace the line starting with “acl verizonfios” with new IP address using sed and ssh?

{ 1 comment }

I‘ve over 1000′s of files starting with _ character as follows:

_file1.txt
_foo1.txt
_2424.txt
_bar10000.txt

How do I remove the first character from a file name:

file1.txt
foo1.txt
2424.txt
bar10000.txt

{ 13 comments }

Q. I’d like to find out if xyz package is available or not using apt-get command. How do I look up package names and contents via shell command? A. You need to use apt-cache command to performs a variety of operations on APT’s package cache. apt-cache does not manipulate the state of the system but […]

{ 0 comments }