Anuj Kaushal

Posts Tagged / bash

How to use “for” loop in one liner bash command

February 21, 2021 | Bash, Blog, Command | by anuj

There is always a need to running a command in the loop and it can be very useful if you don’t have to write a separate bash script to run command in loop.So here are some different ways to run loop in one liner command. Its very useful when you have to delete specific deployment […]

How to open server bash inside local shell script

July 26, 2020 | Bash, Blog | by anuj

Its always tricky to start deployment operation on local and perform few steps on server bash and i was looking for a way to write all local and server commands inside a single deployment file. Finally i was able to do that using following code. The trick is open and close “SSHBASH” every command inside […]

Bash script to get HTTP response code from list of URL

May 12, 2020 | Bash, Blog | by anuj

While preparing list of active stores i had to create following script because the list of stores were in hundreds. Here is a simple bash script to read list of URLs from a text file and generate the output in a separate file with comma delimited.