Unix/Linux Go Back    

Showing results 1 to 25 of 500
Search took 0.08 seconds.
Search: Posts Made By: mohtashims
Forum: Shell Programming and Scripting Linux 2 Days Ago
Replies: 2
Views: 114
Posted By mohtashims
Need to grep for decimal values only in the second column.

Hi,

I have a file in which I need to print all the lines that have decimal values in the second column.

The below prints all the decimal values from the second column but I need the complete...
Forum: Shell Programming and Scripting Linux 1 Week Ago
Replies: 4
Views: 116
Posted By mohtashims
Tools How can i get variable value inside << EOS?

Hi,

Below is my code:


user="wluser"
password="welcom123"
ip=$1

expect << 'EOS'
Forum: Shell Programming and Scripting Linux 03-05-2018
Replies: 4
Views: 289
Posted By mohtashims
Hammer & Screwdriver Is there any option to suppress "ECDSA key...

Is there any option to suppress "ECDSA key fingerprint"
Forum: Shell Programming and Scripting Linux 03-05-2018
Replies: 4
Views: 289
Posted By mohtashims
Hammer & Screwdriver Issues making SSH non-Interactive

I fire the rsyn command as below:

rsync --delay-updates -F --compress --archive -e "/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ...
Forum: Shell Programming and Scripting Linux 03-01-2018
Replies: 2
Views: 258
Posted By mohtashims
Hammer & Screwdriver It works! thank you for the useful tip. I was...

It works! thank you for the useful tip. I was thinking if i could get it to work with --rsh instead of -e.
Forum: Shell Programming and Scripting Linux 03-01-2018
Replies: 2
Views: 258
Posted By mohtashims
Hammer & Screwdriver How to avoid rsync "The authenticity of host" prompt?

Hi,

I wish to bypass the rsync prompt thus making the command non-interactive.

Below is where it asks for prompt:

rsync --delay-updates -F --compress --archive...
Forum: Shell Programming and Scripting Linux 02-28-2018
Replies: 1
Views: 253
Posted By mohtashims
Hammer & Screwdriver Need fix for rsync Error due to version mismatch

rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -t -a -x' /web/admin/Transfer/data/ user1@destserver1:/tmp/testf

rsync version on sender server is:3.0.9
rsync version on sender...
Forum: Shell Programming and Scripting Linux 02-13-2018
Replies: 4
Views: 296
Posted By mohtashims
It does not seem to return the correct output or...

It does not seem to return the correct output or does it?
bash-3.2$ ps -o "pid ppid comm args" | grep webservd
7291 23776 grep grep...
Forum: Shell Programming and Scripting Linux 02-12-2018
Replies: 4
Views: 296
Posted By mohtashims
Hammer & Screwdriver Need iplanet process health runtime details

Hi,

I have iPlanet 7.0 process running on Solaris system
SunOS mymac15.10 Generic_150400-59 sun4v sparc sun4v.

The link here (https://docs.oracle.com/cd/E19146-01/821-1836/gewza/index.html)...
Forum: Shell Programming and Scripting Linux 02-07-2018
Replies: 1
Views: 289
Posted By mohtashims
Hammer & Screwdriver Issue with rsync: failed to set times on "/tmp/.": Not owner (1)

Hi,

Here is my source host and folder details.
[src-user@source-host]$ hostname
source-host
[src-user@source-host Trn_File]$ id
uid=600000208(src-user) gid=64688(src-user)...
Forum: Shell Programming and Scripting Linux 02-06-2018
Replies: 2
Views: 507
Posted By mohtashims
Hammer & Screwdriver You got it right. removing the -S none helped...

You got it right. removing the -S none helped resolve the problem.

Now, the bigger issue is; how do i make Ansible construct the rsync command without the -S none as the argument.
Forum: Shell Programming and Scripting Linux 02-05-2018
Replies: 2
Views: 507
Posted By mohtashims
Hammer & Screwdriver Rsync Error: rsync: link_stat failed: No such file or directory (2)

I wish to copy all the files & folder under /web/Transfer_Files/data/ on mymac1 (Linux) to remote server mybank.intra.com (Solaris 10) /tmp/ location

I am using Ansible tool synchronize module...
Forum: Shell Programming and Scripting Linux 01-17-2018
Replies: 6
Views: 371
Posted By mohtashims
Tools How to bypass rm command when there are no files to delete?

Hi,

Below command works fine when we have other files apart from hello.txtls | ggrep -v hello* | xargs rm -rfBut, if there is only one file i.e hello.txt the rm command does not find anything to...
Forum: Shell Programming and Scripting Linux 10-10-2017
Replies: 14
Views: 1,095
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: 1,095
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: 1,095
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: 1,095
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: 625
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: 625
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: 536
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: 536
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: 536
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: 1,095
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: 1,095
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: 1,095
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...
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 04:58 AM.