Search Results

Search: Posts Made By: chandu123
2,888
Posted By Sharma331
Thank you!! It works for me now
Thank you!! It works for me now
14,086
Posted By in2nix4life
The ps command has an elapsed time option that...
The ps command has an elapsed time option that shows how long a process has been running.

i.e.

ps -eo etime,user,pid,args | grep [p]rsd


The first column shows how long the process has...
14,086
Posted By Chubler_XL
You could try something like this (don't have AIX...
You could try something like this (don't have AIX available to test it), this will list PID of any prsd process running for more than 2 hours

ps -eo "comm pid etime" | awk '
BEGIN {split("1 60...
14,086
Posted By Don Cragun
You can rewrite prsd to flush its output buffers...
You can rewrite prsd to flush its output buffers every x minutes, or to flush its output buffers and exit if it receives a certain signal. Then after having updated prsd you can write a shell script...
1,644
Posted By balajesuri
The following converts 2013-10-11 13:06:19 to...
The following converts 2013-10-11 13:06:19 to seconds from epoch:

$ perl -MTime::Local -e 'print timelocal(19, 6, 13, 11, 9, 2013)'
1381476979

The month is from 0..11 (Jan..Dec) and so, Oct is...
3,382
Posted By DeCoTwc
Only because I can't sleep... lsvg -o |...
Only because I can't sleep...


lsvg -o | while read VG
do
lsvg -l $VG | while read -a x
do
case "${x[6]}" in
(closed)
echo $VG ${x[5]} Closed
;;
(*)
echo $VG...
3,382
Posted By DGPickett
Well, $? has a short shelf life, as everything...
Well, $? has a short shelf life, as everything under the sun sets it, so what works on a command line does not work on slightly more complex command line. It is commonly used something...
3,382
Posted By Corona688
does lsvg actually read from stdin? This code...
does lsvg actually read from stdin? This code looks needlessly convoluted...
3,382
Posted By DGPickett
I never used $? to test a grep in a `subshell`. ...
I never used $? to test a grep in a `subshell`. Does it return the grep $? in both ksh and bash? I would test 'if [ "$CLOSED_OUT" != "" ]' and put $VGLIST in the message. VGLIST seems a strange...
1,801
Posted By Yoda
You can use base64 -d option for decoding data,...
You can use base64 -d option for decoding data, check the manual page here (https://www.unix.com/man-page/linux/1/base64/)
echo "YmlwaW5haml0aAo=" | openssl base64 -d
bipinajith
8,914
Posted By Corona688
We need to see more of the XML.
We need to see more of the XML.
8,914
Posted By Yoda
Using awk:- awk -F'[<|>]' '/dp:file/ { print $3...
Using awk:-
awk -F'[<|>]' '/dp:file/ { print $3 } ' xml_file
8,914
Posted By spacebar
This is one way using sed: $ echo '<dp:file>...
This is one way using sed:
$ echo '<dp:file> This is dp file output </dp:file>' | sed -n 's/<dp:file>\(.*\)<\/dp:file>/\1/p'
This is dp file outputExample of running command on file:
sed -n...
9,734
Posted By otheus
Might be simpler to let awk do the calculation,...
Might be simpler to let awk do the calculation, and let the script's input parameters be used in the normal sense.
This code looks longer, because I added lots of checking, but the functional part...
9,734
Posted By ctsgnb
In : count=$((($threshold*$1/100)-$2-1064)) ...
In :
count=$((($threshold*$1/100)-$2-1064))
$1 is supposed to refer to the total number of 1K block
$2 is supposed to refer to the number of block currently in use

So you should adapt the code...
9,734
Posted By ctsgnb
what output does df -k yourfilesystem | tail...
what output does
df -k yourfilesystem | tail -1give ?

Maybe this will be more reliable :
threshold=70
FStoFill=/tmp
set -- $(df -k $FStoFill | tail -1 | awk '{$1=$1;print $(NF-4),$(NF-3)}')...
9,734
Posted By ctsgnb
threshold=80 FStoFill=/tmp set -- $(df -k...
threshold=80
FStoFill=/tmp
set -- $(df -k $FStoFill | tail -1)
dd if=/dev/zero of=$FStoFill/zerofile.$$ bs=1k count=$((($threshold*$2/100)-$3))But the dd command above may be set up to be faster...
1,350
Posted By Corona688
VAR="LL9@99V@N=34566666" OLDIFS="$IFS"; IFS="="...
VAR="LL9@99V@N=34566666"
OLDIFS="$IFS"; IFS="="
set -- $VAR
IFS="$OLDIFS"

awk '/"PADWD"/ && ($0 ~ P1) { sub(/"[^="]*=[^"]*"$/, "\"" P1 "=" P2 "\""); } 1' P1=$1 P2=$2 inputfile > outputfile
Showing results 1 to 18 of 18

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