Search Results

Search: Posts Made By: Karthikeyan_113
9,530
Posted By Karthikeyan_113
Try this one... iostat -dt -kx 2 2 | awk...
Try this one...

iostat -dt -kx 2 2 | awk 'BEGIN {max = 0.00} !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {if ($12>max) max=$12} END {print max}'
3,012
Posted By Karthikeyan_113
Is your file format is fixed character length ???
Is your file format is fixed character length ???
9,530
Posted By Karthikeyan_113
This fulfils your requirement rite ???
This fulfils your requirement rite ???
3,103
Posted By Karthikeyan_113
Dont open multiple threads for the same issue,...
Dont open multiple threads for the same issue, delete this one.
9,530
Posted By Karthikeyan_113
Did you try this one... ??? iostat -dt -kx 2...
Did you try this one... ???

iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}' | awk 'BEGIN {max = 0.00} {if ($0>max) max=$0} END {print max}'
9,530
Posted By Karthikeyan_113
iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/...
iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}' | awk 'BEGIN {max = 0.00} {if ($0>max) max=$0} END {print max}'
I hope this works, but i am not sure. Try...
16,075
Posted By Karthikeyan_113
Barani, i was thinking to declare the...
Barani,

i was thinking to declare the parameter that you want as output as OUT parameter and calling the function. But yeah... once you log into SQL, taking the parameter from SQL session to UNIX...
8,720
Posted By Karthikeyan_113
I think when you have more directories, this...
I think when you have more directories, this might give error.
Try the below one.

Considering you have 675 files...
We will put 200 files into each of the dirs. so we need 4 dirs.

for (( i=1;...
16,075
Posted By Karthikeyan_113
If you want just the value of the cnt variable, ...
If you want just the value of the cnt variable,
1. you can use a stored procedure with OUT parameter.
2. A Function which returns its value.

If you dont want to use the above 2 methods. There...
12,486
Posted By Karthikeyan_113
Check with perl
Hi Kanu,

Please try the below.
Note: The change will be made to the input file directly.


perl -pi -e 's/-/ /g' <file >
perl -pi -e 's/^/ /g' <file >


Once you have the list of the...
17,132
Posted By Karthikeyan_113
Try this....
Hi

Below is the piece with which you can achieve your task.


while [[ -z $user ]]
do
echo "Enter the user name : "
read user
done

echo
echo "Validating the $user ..."
if [[ `grep -c...
17,132
Posted By Karthikeyan_113
is who command working in your system ?
Hi

is "who" command working in your system ?

==========
Thanks,
Karthikeyan.
==========
5,781
Posted By Karthikeyan_113
Added the exception handling part, try this....
When executing the script for a wrong PID, the error " -: ".

When the varaible linenum is having a null value, we get the above error.

To overcome this, we need put a exception. I have...
5,019
Posted By Karthikeyan_113
Are you getting any error ?
Hi KKC,

are you getting any error ?
anyprobem with the execution, why do you want to changethe highlighted part ?

==========
Thanks,
Karthikeyan.
==========
5,781
Posted By Karthikeyan_113
Try this....
Try the below code.

echo "Enter the PID :"
read pid
linenum=`cat tes.txt | tr -s " " "|" | cut -d"|" -f2 |grep -n $pid`
cat tes.txt | head -$linenum | tail -1


Its giving the expected...
5,019
Posted By Karthikeyan_113
Plz post with care
You getting the directory name in the variable file.
and then you are using it as the filename ???
I guess this will create confusion. Pls post with care.

==========
Thanks,
Karthikeyan....
5,019
Posted By Karthikeyan_113
Check this....
when you want the value of the variables to be substituted, you need to specify the expression in double codes.

==========
Thanks,
Karthikeyan.
==========
5,019
Posted By Karthikeyan_113
Clarification....
Hi KKC,

summer_cherry was asking you to replace the single codes in the sed command with double codes.


sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g" $file


==========...
28,489
Posted By Karthikeyan_113
Another suggestion...
Just give it a try and see.
for x in `grep -n "pattern" <filename> |cut -d":" -f1`
do
head -$x <filename> | tail -10
done
Its working but performance issue may be there.
1,718
Posted By Karthikeyan_113
Do you still need the help ?
Have you resolved the issue... or still u need the help ?
4,738
Posted By Karthikeyan_113
Try this....
Input file:-
$ > cat 123.txt
unixsrv1:unixsrv2:unixsrv3:mercury:mercury01:sunprd01:sunprd02:hpprod07:ibmprod43
$ >

Command:-
$ > cat 123.txt | tr -s ":" "\n" > 123_1.txt
$ >

Output:-
$ >...
2,971
Posted By Karthikeyan_113
Try this
Try the following i got the exact result that you were expecting.

newdir=`basename $BackupLocation`
BackupLocation=$BackupLocation/$newdir$(date +%w)
...
15,569
Posted By Karthikeyan_113
explanation
Hi

Sorry for the late reply. Was little busy with work.

#########################
for x in `cat xxxx.txt`
do
passwd=$x
#
#your processing will come here.
#
done...
3,174
Posted By Karthikeyan_113
Try the below "FOR loop"
Sorry to interupt.

Please try the loop. It will work for all the conditions you were expecting. I tried and it looked fine.

##################################################
for x in `cat...
15,569
Posted By Karthikeyan_113
Try the "FOR Loop..."
you can use the below FOR loop.
If you have only password in the xxxx.txt, then this will help.
Otherwise you need to cut to get the value stored, into the passwd variable.
...
Showing results 1 to 25 of 25

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