Search Results

Search: Posts Made By: srkmish
Forum: Programming 02-16-2017
3,176
Posted By Corona688
Moved to "Programming", since the question wasn't...
Moved to "Programming", since the question wasn't about shell script.

Your question amounts to the one which always has to be asked about Perl and Python.

How many rounds of installation...
9,469
Posted By Skrynesaver
You don't have access to the CPAN repository from...
You don't have access to the CPAN repository from your host?

You could take the required module code from these links
https://metacpan.org/source/MQSERIES/MQSeries-1.34/MQSeries.pm...
1,654
Posted By RudiC
And, don't use /ERROR/ (which is a regex...
And, don't use /ERROR/ (which is a regex constant) but $0 ~ ERROR in lieu.
1,654
Posted By pravin27
Yes, you can pass the $error variable to awk as...
Yes, you can pass the $error variable to awk as you did for DT

awk -vDT=$(date +"%y%m%d%H%M" -d"- 3 hour") -vERROR=$error
6,558
Posted By junior-helper
Why? In posting #1 you said you can install free...
Why? In posting #1 you said you can install free software and AFAIK plink is free software just like putty :confused:

Right. Maybe you will need to polish your syntax though.
plink -l username...
1,550
Posted By gull04
Hi, You can try the following if you just...
Hi,

You can try the following if you just want a count.

ps -ef | grep ^Admin | grep -inae 'Jan' -e 'Feb' -e 'Mar' | wc -l

Regards

Dave
1,550
Posted By RavinderSingh13
Hello srkmish, Could you please try...
Hello srkmish,

Could you please try following and let us know if this helps.


ps -ef | awk '/^dmdadm06/ {if($0 ~ var){count_var++}} END{print count_var}' var="string needs to be searched"
...
14,213
Posted By Don Cragun
Congratulations! We are always glad to hear that...
Congratulations! We are always glad to hear that the people who have come to The UNIX and Linux Forums are learning how to write code that works after getting help with the basics from the...
7,689
Posted By MadeInGermany
You can simply collect stdout from the script. ...
You can simply collect stdout from the script.
First change Script1.sh to produce stdout:
zcat /logs/jvm1/Audit.log.gz | grep 'Exception'Then run it from server1 as
for server in server2 server3...
7,689
Posted By RudiC
Remove the redirection from Script1, and try...
Remove the redirection from Script1, and try putting all server logins into one script, e.g. Scr2:ssh -x server2 "/bin/sh -s" < Script1.sh
ssh -x server3 "/bin/sh -s" < Script1.sh
ssh -x server4...
4,529
Posted By Chubler_XL
Below should do what you asked for. However,...
Below should do what you asked for. However, beware this isn't a full XML parser and many things can still trip it up for example:

<xml><object1>
value</object1></xml>

awk -F'[><]' '
NF {
...
14,213
Posted By MadeInGermany
Passing complex commands with ssh is problematic,...
Passing complex commands with ssh is problematic, because there are two shells that evaluate the script: one on the local host and one on the remote host.
Save the script on the local host, and pass...
3,790
Posted By Chubler_XL
Have look a this thread...
Have look a this thread (https://www.unix.com/shell-programming-and-scripting/249416-data-formatting-csv-file-excel.html) where I suggest an awk script in combination with a template file to produce...
3,790
Posted By mjf
You can also add comma delimiters between columns...
You can also add comma delimiters between columns and write to csv file. Then open csv file in Excel. Note you will need to choose another delimiter if the data could have embedded commas. Here is an...
6,558
Posted By Corona688
PUTTY cannot do that. PUTTY is graphical, and...
PUTTY cannot do that. PUTTY is graphical, and displays the result graphically.

The plink utility I mentioned earlier is non-graphical, and prints to the CMD prompt, which you can capture with for...
14,213
Posted By Don Cragun
If I'm reading MadeInGermany's code correctly, it...
If I'm reading MadeInGermany's code correctly, it is comparing YY/DD/MM HH:MM:SS instead of YY/MM/DD HH:MM:SS and is printing the more than 3 hours ago timestamps instead of the less than 3 hours old...
14,213
Posted By RudiC
Well, try this based on MadeInGermany's proposal:...
Well, try this based on MadeInGermany's proposal: awk -vDT=$(date +"%y%m%d%H%M" -d"- 3 hour") '
{sub(/^\[/,"")
split ($1, D, "/")
split ($2, T,...
6,558
Posted By Perderabo
Read your putty documentation again. Chapter 9...
Read your putty documentation again. Chapter 9 describes using pagent to supply authentication. Once pagent is running you can do stuff like this:
C:\Windows\System32>
C:\Windows\System32>...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 09:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy