Skip to content

Tag: shell

Getting unexpected newline error while doing awk

I am running the following script in linux command line: I am getting the following error: I believe the quotes and spaces are consistent, but why am i still getting this error? Output of ps -ef | grep “java -Droute=full” Answer The actual problem you’re trying to solve is something like &#8…

Bash offer numberd results for selection to user

my script takes in a site name from the user. Its then allows the user to checkout, edit, and commit changes to the file, via the script. However, some sites have two to six files. So the script lists them as follows You have more than one Cambridge file. Please pick from the following: cambridge1 cambridge2 …

Search and replace file content using shell script

I want to search and replace specific value in a file, here is the content of the file I want to replace DocumentRoot /var/www/html with DocumentRoot /var/www/html/centos I tried the following This is not working, can someone point me to the right direction. Thanks Answer The line you are trying to replace is…