How to test ssh connection using bash script in Linux

How to test ssh connection using bash script in Linux

There can be multiple scenarios due to which ssh connection may fail, some of them can be network issues password incorrect passphrase incorrect and many more.. so we will try to rule out all the possible failed scenarios with some pre-checks before we do the actual task to make sure my ssh doesn’t get hang … Read more

sed: Ignore whitespace while matching a pattern

In my last articles I had shared the arguments with sed which can be used to perform case insensitive actions (search, replace..) in a file and to delete all blank lines from the file. Now suppose you have a set of words or line which want to match and perform some activity but you do … Read more

sed: delete all blank lines from a text file

Here our requirement is to remove all the blank lines from a file. Our sample file [root@golinuxhub ~]# cat /tmp/file This is line one This is line two This is line three This is line four [root@golinuxhub ~]# Use the below command to remove all the blank lines from a text file [root@golinuxhub ~]# sed … Read more

close button