Search Results

Search: Posts Made By: shantanuo
Forum: AIX 11-18-2010
13,961
Posted By shantanuo
and the reason for the behavior is....
and the reason for the behavior is....
1,556
Posted By shantanuo
sed output with numbers
I get the same value "chinchwad" for the following 3 statements.

echo "ABCDchinchwad18-Mar-2010-11.sql.zip" | sed -r 's/([A-Z]+)([a-z]+)(.*)/\2/'
echo "ABCDchinchwadII18-Mar-2010-11.sql.zip" |...
6,296
Posted By shantanuo
Escape Space in a ssh command
The following statement does work. But the second command does not work as expected.

ssh root@123.123.123.123 \\"mysqldump -h localhost -u root -pPassWord dbName -d | gzip -cf\\" | gunzip -c >...
3,075
Posted By shantanuo
#!/bin/sh for dbName in `mysqlshow -uroot...
#!/bin/sh
for dbName in `mysqlshow -uroot -pPassWord | awk '{print $2}'`
do
echo "$dbName" | egrep -v 'mysql|test|Databases|information_schema';
done
5
tee
5,397
Posted By shantanuo
mysql -uroot -pPassWord --tee='/root/myquery.txt'...
mysql -uroot -pPassWord --tee='/root/myquery.txt'

I do always use tee while accessing Mysql database. This helps me to check the output of a sql command when I can not browse the earlier pages...
5,738
Posted By shantanuo
remove old backup files
# find /home/shantanu -name 'my_stops*' | xargs ls -lt | head -2

The command mentioned above will list the latest 2 files having my_stops in it's name. I want to keep these 2 files. But I want to...
2,624
Posted By shantanuo
Resolved
The problem was resoved when I added the "s" in double quotes like this...

sed "s/$combined/$table/g"
2,593
Posted By shantanuo
Correct syntax
Thanks a lot for that syntax. I requested the change and I am now getting the correct results.
I can not use the module because I have only the access_log text files. :)
4,696
Posted By shantanuo
Replace entire line
I want to replace one line from my configuration file with the new settings.
The file Name: /etc/httpd/conf/httpd.conf

The following line should be replaced with the line mentioned below.
...
2,624
Posted By shantanuo
No quotes when double quotes
When I used double quotes, the grep statement translates without any quotes.
2,624
Posted By shantanuo
Variables in shell script
mysqldump --compact --add-drop-table -h192.168.150.80 -uroot -p somePass $combined | sed '/$combined/$table/g' | mysql $databaseThe sed part is not working from the above statement.
The variables...
2,593
Posted By shantanuo
I have changed the LogFormat of httpd But the...
I have changed the LogFormat of httpd
But the %t display the date in the following format.

[31/Aug/2009:11:56:59 +0530]


MySQL does not understand this format and needs to be formatted...
2,593
Posted By shantanuo
Text to CSV
Hi,
My access log looks like this...

192.168.50.184 - - [31/Aug/2009:11:56:59 +0530] "GET /ATIM_LATEST/ABC/ HTTP/1.1" 200 522 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.13)...
2,127
Posted By shantanuo
Registering Load time
I have a site with a few hundred pages.
I want to know which pages load in more than 6 seconds.
Is it possible? Is there any shell script or tool for this purpose?
15,435
Posted By shantanuo
Converting decimal to integer
The shell mentioned below will show a warning if the page takes more than 6 seconds to load.
The problem is that myduration variable is not an integer. How do I convert it to integer?


...
2,344
Posted By shantanuo
saving running text to a text file
I tried the

tail -f my-slow.log | grep 'someWord' > /root/myfile.txt

This does not work.

I tried --tee as well and that too does not work. Any help?
1,941
Posted By shantanuo
Your code did work. Thanks.
Your code did work.
Thanks.
1,941
Posted By shantanuo
Now I get the following error: ...
Now I get the following error:

highprocess.sh: line 11: [[: |: syntax error: operand expected (error token is "|")
1,941
Posted By shantanuo
integer treated as text?
The following script should kill all the queries taking more than say 600 seconds. But it seems that it is killing queries taking more than 6 seconds.

>> sh myscript.sh 600

#!/bin/bash
#kill...
3,364
Posted By shantanuo
I tried both the commands and the only difference...
I tried both the commands and the only difference is the missing ';' from the last line while using awk

$ sed 's/DEFAULT CHARSET=[^ \;]*//;s/COLLATE=[^ \;]*//;s/AUTO_INCREMENT=[^...
3,364
Posted By shantanuo
Thanks chipcmc. But as shown in your own...
Thanks chipcmc.
But as shown in your own example, the CHARSET=latin1; is still there on line 3. The lines 1 and 2 are OK.
6,227
Posted By shantanuo
wget and rename
I want to download xyz.php to abc.php and save it in the directory mentioned.

wget -directory-prefix=/usr/local/apache/htdocs/ http://somesite.com/xyz.phpThis command will save the file as xyz.php...
3,364
Posted By shantanuo
Thanks. But it it does not work when the line...
Thanks. But it it does not work when the line does not has the auto_increment clause. In the example, the third line is wrong. There should have been no "Default charset".

>> cat test.txt
)...
3,364
Posted By shantanuo
Remove certain section from the line
A typical line looks like this...

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=129 COMMENT='Compiled E-Mails';I want to remove DEFAULT CHARSET= and COLLATE= after...
7,712
Posted By shantanuo
Display first few characters only
I have a file with one or two lengthy lines like....
masterUserID = 'S' OR masterUserID = 'S' OR masterUserID = 'S' (many many more times)

How do I display only the first few hundred characters...
Showing results 1 to 25 of 81

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