Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.07 seconds.
Search: Posts Made By: mohtashims
Forum: Shell Programming and Scripting Linux 10-11-2017
Replies: 14
Views: 980
Posted By mohtashims
Hammer & Screwdriver My ksh version is: strings /bin/ksh |...

My ksh version is:

strings /bin/ksh | grep "[V]ersion"
@(#)Version M-11/16/88i


the variable name is cppath.

I tried read -u 3 cppath "Where do you want to copy $entry to? Please...
Forum: Shell Programming and Scripting Linux 10-10-2017
Replies: 14
Views: 980
Posted By mohtashims
I tried that but it gives me this error: +...

I tried that but it gives me this error:

+ read -u 3?cppath Where do you want to copy bingo.txt to? Please enter the complete directory location:
./readtest.sh[25]: 3: is not an identifier

...
Forum: Shell Programming and Scripting Linux 10-10-2017
Replies: 14
Views: 980
Posted By mohtashims
The reason for changing to KSH from BASH was my...

The reason for changing to KSH from BASH was my bash version is 10 yrs old and I cannot update it as I m not the system admin. I need my variable to hold global value so it persists its value outside...
Forum: Shell Programming and Scripting Linux 10-10-2017
Replies: 14
Views: 980
Posted By mohtashims
Can you please tell me why is it failing when I...

Can you please tell me why is it failing when I try the same.

#!/bin/ksh
. ./deploy.profile
set -x
found_flag=0
searchdir=/tmp/moht
CWD=$(pwd)

find $searchdir"/PRESENT/data" -type f...
Forum: Shell Programming and Scripting Linux 10-07-2017
Replies: 2
Views: 491
Posted By mohtashims
sudo git clone...

sudo git clone https://github.com/ansible/ansible.git (https://github.com/ansible/ansible.git)
works !! Thank you.
Forum: Shell Programming and Scripting Linux 10-06-2017
Replies: 2
Views: 491
Posted By mohtashims
Hammer & Screwdriver Error downloading from GiT: fatal: unable to connect to github.com:

My below command fails with the error as shown:

$ sudo git clone git://github.com/ansible/ansible.git
Cloning into 'ansible'...
fatal: unable to connect to github.com:
github.com[0:...
Forum: UNIX for Beginners Questions & Answers Linux 10-06-2017
Replies: 6
Views: 489
Posted By mohtashims
grep -v $$ helped !!. Thank you.

grep -v $$ helped !!. Thank you.
Forum: UNIX for Beginners Questions & Answers Linux 10-05-2017
Replies: 6
Views: 489
Posted By mohtashims
RedHat My script terminates before I expect it to ......

My script terminates before I expect it to ... The for loop break in between for some reason.

Here is my script run.sh

#!/bin/bash
echo "Stopping Servers"
for i in $(echo $1 | sed...
Forum: UNIX for Beginners Questions & Answers Linux 10-05-2017
Replies: 6
Views: 489
Posted By mohtashims
Tools How to avoid arguments inside Nawk command?

Hi,

Here is my command



print $2 was meant to select the second column however, it is getting substituted with the second argument that was passed to the script.

Can you...
Forum: Shell Programming and Scripting Linux 10-04-2017
Replies: 14
Views: 980
Posted By mohtashims
Bug Thank you; I will try these out tonight and let...

Thank you; I will try these out tonight and let you know if they work realtime.

---------- Post updated at 11:56 AM ---------- Previous update was at 11:40 AM ----------



The files may not...
Forum: Shell Programming and Scripting Linux 10-04-2017
Replies: 14
Views: 980
Posted By mohtashims
Tools Can you please give me an example for this...

Can you please give me an example for this approach ?

Also, if i use your code how can i include wow.tar along with test.tar ?

I mean test.tar or wow.tar if either is found do not consider...
Forum: Shell Programming and Scripting Linux 10-04-2017
Replies: 14
Views: 980
Posted By mohtashims
RedHat Unable to read user input inside a loop

Hi,

This query is a part of a much more lengthy script.

I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all...
Forum: Shell Programming and Scripting Linux 10-04-2017
Replies: 5
Views: 555
Posted By mohtashims
RedHat I m trying this option for a solution. ...

I m trying this option for a solution.

#!/bin/bash
shopt -s lastpipe
However, I get the below error.

./run.sh: line 2: shopt: lastpipe: invalid shell option name


My bash version is
Forum: Shell Programming and Scripting Linux 10-03-2017
Replies: 5
Views: 555
Posted By mohtashims
Hammer & Screwdriver Variable loses value outside loop

Hi,

I am looking for a global variable found_flag to be set a value that can be accessed outside the loop anywhere in the bash shell script.

more test.sh
found_flag=0
...
Forum: Shell Programming and Scripting Linux 09-25-2017
Replies: 3
Views: 350
Posted By mohtashims
Signal Query regarding PuTTY SSH Tunneling

I have a process running on my local server.

http://dev.techx.com:6060/proct

I wish to block port 6060 and expose port 7777 to the outside world.

I block port 6060 and open port 7777 on the...
Forum: Shell Programming and Scripting Linux 09-25-2017
Replies: 4
Views: 399
Posted By mohtashims
Hammer & Screwdriver 1. I thought every running process including...

1. I thought every running process including firewall process has to have a socket [IP Port] associated with it.

Not sure if firewall process was excluded from the rule, becoz the firewall process...
Forum: Shell Programming and Scripting Linux 09-24-2017
Replies: 2
Views: 343
Posted By mohtashims
Lightbulb It worked :) Thank you !!

It worked :) Thank you !!
Forum: Shell Programming and Scripting Linux 09-24-2017
Replies: 4
Views: 399
Posted By mohtashims
How to check the IP:PORT firewall uses?

I have my firewall process running

[root@development_techx tmp]# ps -ef | grep firewall
root 21169 1 0 08:50 ? 00:00:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
...
Forum: Shell Programming and Scripting Linux 09-17-2017
Replies: 3
Views: 340
Posted By mohtashims
RedHat I frankly did not understand what solution you...

I frankly did not understand what solution you are proposing to make the techx look same as development_techx

[root@techx ~]# find /etc/mail -type f -exec chmod 644 {} \;
[root@techx ~]# cd...
Forum: Shell Programming and Scripting Linux 09-17-2017
Replies: 3
Views: 340
Posted By mohtashims
RedHat Strange permission issue on Linux server.

Starting sendmail throws this error:



I decided to see the permission on the files under /etc/mail and this is the output:

[root@techx mail]# ls -ltr
total 284
-rwxr-xr-x. 1 root root ...
Forum: Shell Programming and Scripting Linux 09-12-2017
Replies: 20
Views: 1,271
Posted By mohtashims
Tools Our domain is techx.com however does not have any...

Our domain is techx.com however does not have any smtp service like smtp.techx.com. Infact techx.com domain is actually provided by same zoho.com.


I m not sure how to setup using this approach....
Forum: Shell Programming and Scripting Linux 09-09-2017
Replies: 20
Views: 1,271
Posted By mohtashims
Error In my previous post i strongly believe that it is...

In my previous post i strongly believe that it is the missing TLS entries in the sendmail.mc or .cf that is causing the send mail not to work. The reason behind this conclusion is that SMTP email...
Forum: Shell Programming and Scripting Linux 09-08-2017
Replies: 20
Views: 1,271
Posted By mohtashims
It still does not work. I will update the maillog...

It still does not work. I will update the maillog in a few hrs.

Here is what I think.

1. I think we need to enable TLS in sendmail for zoho to work. Not sure how to do that if someone can help....
Forum: Shell Programming and Scripting Linux 09-08-2017
Replies: 20
Views: 1,271
Posted By mohtashims
Error Here is what i did. Please suggest if i...

Here is what i did.

Please suggest if i missed anything; still no luck though :(.

Step1:
[root@development_techx ~]# makemap hash /etc/mail/default-auth-info</etc/mail/default-auth-info...
Forum: Shell Programming and Scripting Linux 09-08-2017
Replies: 20
Views: 1,271
Posted By mohtashims
RedHat Note: Although my server is techx.xom we are...

Note: Although my server is techx.xom we are using a third party external smtp mail server i.e smtp.zoho.com (which listens on port 587 while port 25 timesout when you do telnet to smtp.zoho.com)
...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 10:09 AM.