Search Results

Search: Posts Made By: kenshinhimura
3,636
Posted By kenshinhimura
--> <Resource name="UserDatabase"...
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
...
3,636
Posted By kenshinhimura
Im gonna do this, to thousand servers. Im...
Im gonna do this, to thousand servers. Im planning to script it via for loop.
Thanks
3,636
Posted By kenshinhimura
Comment an xml file (beginning and end of the line)
I tried said, still not working. Please check whats wrong. Im hoping for an output.

$ cat bb
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
$
$ sed -i '/<!--.*<Connector...
723
Posted By kenshinhimura
Format the text using sed or awk
I was able to figure out how to format a text.


Raw Data:
$ cat test
Thu Aug 23 15:43:28 UTC 2018,
hostname01,
232.02,
3,
0.00
Thu Aug 23 15:43:35 UTC 2018,
hostname02,
231.09,
4,
0.31...
1,308
Posted By kenshinhimura
Output is final. Made it work. but with ugly...
Output is final. Made it work. but with ugly code.

Mon Aug 20 13:22:53 UTC 2018,comondr01,comondr, 292.405 Mbps
Mon Aug 20 13:22:53 UTC 2018,comondr02,comondr, 265.401 Mbps
Mon Aug 20 13:22:53...
1,308
Posted By kenshinhimura
I did different code on the first block.. Nasty...
I did different code on the first block.. Nasty Ugly. Etc. But it worked. Hoping to clean that one. More cleane. I got the output right... But with an ugly code from me. Thank you for your help. But...
1,308
Posted By kenshinhimura
Don, my challenge now is putting date on total...
Don, my challenge now is putting date on total and averate. Putting a timestamp.. Trying every combination and googling..

------ Post updated at 11:34 AM ------

I modified it to

...
1,308
Posted By kenshinhimura
$ cat hhhh aaabbb1a 4000 aaabbb1g 2000 ...
$ cat hhhh
aaabbb1a 4000
aaabbb1g 2000
aaabbb1f 8000
baabbb4f 5000
baabbb4d 1000
baabbb4s 9000
cddbbbg1 10000
cddbbbg3 11000
cddbbbge 3000

#
#sh ave.sh

aaabbb1a 4000
aaabbb1g 2000...
2,222
Posted By kenshinhimura
for i in `my remote servers|sort`; do echo -n $i...
for i in `my remote servers|sort`; do echo -n $i "";ssh $i " f=\`/sbin/ip a|egrep '127.127|128.128' |head -1| awk '{print \$NF }' \` ; echo \$f " ; done

------ Post updated at 02:29 PM ------...
2,018
Posted By kenshinhimura
comm -23 will work for you
comm -23 will work for you
1,308
Posted By kenshinhimura
awk ' function print_total() { ...
awk '
function print_total() {
printf("\nTotal Sum of %s site is: %d Mbps\n ", last, total)
}
function print_average() {
printf("\nTotal Sum of %s site is: %d Mbps\n ", last,...
1,308
Posted By kenshinhimura
Don, How can we get the average? based on the...
Don,
How can we get the average? based on the sum?

------ Post updated at 09:16 AM ------

Will get the total and average..

aaa1a 1
aaa1g 2
aaa1f 3

Total Sum of aaa1: 6

Total...
1,308
Posted By kenshinhimura
Thank you Don, my question also.. Is there a way...
Thank you Don, my question also.. Is there a way to 1 liner that? In one liner. ii understand it more easily and i can able to repeat it someday.
Thank you

------ Post updated at 07:39 AM ------...
1,308
Posted By kenshinhimura
Get the average of lines with the same first 4 letters
How to sum up and print into the next line the total SUM.

]$ cat hhhh
aaa1a 1
aaa1g 2
aaa1f 3
baa4f 3
baa4d 4
baa4s 4
cddg1 3
cddg3 4
cddfg 1

$ cat hhhh|awk ' {sum+=$2} END {print...
2,222
Posted By kenshinhimura
Declare and grep a variable via ssh/remote/loop
If I am running a bash command, and some awk getting the ethernet adapter on the local machine. It works fine. But if I will run it from the remote, it is EMPTY on echo and throwing error in grep....
1,596
Posted By kenshinhimura
Your explanation is awesome,...I understand now,...
Your explanation is awesome,...I understand now, what makes me confuse before was, I remember to do a backlash to any special character, But in the command below, theres none.

Thanks


sed -i...
1,596
Posted By kenshinhimura
Thank you rdxt1, can you please explain,...
Thank you rdxt1, can you please explain, character per character please. the sed command.
Thank you
1,596
Posted By kenshinhimura
Sir can you please copy the text, and test it....
Sir can you please copy the text, and test it. Also please check the output.
Thank you

---------- Post updated at 04:12 PM ---------- Previous update was at 04:08 PM ----------

'''do you mind...
1,596
Posted By kenshinhimura
Delete special characters
My sed is not working on deleting the entire special characters and leaving what is necessary.grep connections_per a|sed -e 's/\<\!\-\-//g'
INPUT:

<!--...
3,267
Posted By kenshinhimura
Instead of locate i change it to "find...
Instead of locate i change it to "find /specific_directory -name"
Hi Rudi, care to share why it worked? Do you mind explaning it line by line please? Also why While? WHy not another for loop?...
3,267
Posted By kenshinhimura
ITs really hard right? :) because that is just an...
ITs really hard right? :) because that is just an example..the real data is 100 files..

What i have done in the past is to run the 2 for loop and copy manullay to specific folder.
3,267
Posted By kenshinhimura
yup they are duplicate files in multiple...
yup they are duplicate files in multiple locations..i intend to do that.. so it should be copied on the specied folder..
3,267
Posted By kenshinhimura
+ read f d + [[ -n folder1 ]] + [[ -n file1...
+ read f d
+ [[ -n folder1 ]]
+ [[ -n file1 ]]
++ locate file1
+ filepath='/home/aaa/a/file1
/home/do/file1
/home/files/file1
/var/lib/mysql/ib_logfile1'
+ [[ -e /home/aaa/a/file1...
3,267
Posted By kenshinhimura
it works now, but it only copy the last file to...
it works now, but it only copy the last file to the last folder.


I was expecting something like this

output:

/home/data/folder1/file1
/home/data/thisforfile2/file2...
3,267
Posted By kenshinhimura
not working, locate/find.. it will locate the...
not working,
locate/find.. it will locate the files anywhere in the system, the file1,file2 could be in different directories..
Showing results 1 to 25 of 197

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