Search Results

Search: Posts Made By: ashokvpp
1,417
Posted By ashokvpp
Find and replace in multiple files
Hi,


I have php files in main dir and sub dir's as well.

I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');"
and replace as "new mysqli('localhost', 'unx_sys',...
9,741
Posted By ashokvpp
Yes tabs and no need to preserve it.
Yes tabs and no need to preserve it.
9,741
Posted By ashokvpp
sed add double quotes and comma
Hi,


00000119EEEC3F25 feedoor 20171103
0000011A4F152077 feedard 20171024
00000191FA295F61 feedzipperhola 20171023
00000213C57BB856 feedriodapple 20171005...
2,318
Posted By ashokvpp
Mailq regex match
Hi,


# mailq | awk '{match($0, /quota/)} {print $0}' | head
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------

9A6A7DE117E 84309 Sat Sep 30 14:14:50 ...
Forum: Linux 08-16-2017
2,364
Posted By ashokvpp
Apache wildcard ssl on subdomain serves same page for non ssl virtualhosts
Issue observed: I have configured ng.my-site.com using widlcard ssl cert. When I hit https://www.my-site.com it loads ng.my-site.com website!

please advise if I missed any concept / configs......
1,167
Posted By ashokvpp
Name = str(container['Names']) print...
Name = str(container['Names'])

print str(Name[0])+'-'+hnBut it does print extra / in front of
/lilly2232321-simsa-svr
How to get rid of it?

Please use CODE tags as required by forum rules!
...
1,167
Posted By ashokvpp
Python concat list with a string variable
Hello!

#!/usr/bin/env python
hn = "simsa-svr"
for container in containerslist:
Name = container['Names']

I want to print Name along with hn i,e simsa-svr. I tried...
1,206
Posted By ashokvpp
Super it works as expected. Good day!
Super it works as expected. Good day!
1,206
Posted By ashokvpp
Tweak python program to give result in json
Hi ,

Below is the script which prints result in json but when i validate it has some tab or extra space issues.

JSON result

{

"data":[

{ "{#NAME}":"lilly-54b91f8-2
"}
,

...
2,746
Posted By ashokvpp
Good to know we can use like (FROM|INTO)?
Good to know we can use like
(FROM|INTO)?
2,746
Posted By ashokvpp
awk '/^#/{s=$1 OFS $2}/^.* FROM `.*`/{print...
awk '/^#/{s=$1 OFS $2}/^.* FROM `.*`/{print "Timestamp : ",s,"Table :", substr($3,2,length($3)-2), "Query Type :", $1}'

I need to match 3 sql's like INSERT INTO <tablename> , UPDATE <tablename>...
2,746
Posted By ashokvpp
awk if match
Hi,

This is the file content:
#160814 20:43:00 server id 2 end_log_pos 169934694 Query thread_id=8927407 exec_time=0 error_code=0
use sun_final/*!*/;
SET...
1,329
Posted By ashokvpp
Input redirection script
Hi,


#!/bin/bash

while [ 1 ];
do
rm -f /tmp/pipe
mkfifo /tmp/pipe
./yuv4mpeg_to_v4l2 < /tmp/pipe &
mplayer tom_and_jerry.mp4 -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe
sleep...
1,595
Posted By ashokvpp
"solved"
"solved"
1,595
Posted By ashokvpp
Regex match date and seconds format
Hi

$ awk '{print $1," ",$4}' access.log | sort | uniq -c| sort -nr | head -n20
62 192.168.10.6 [31/May/2015:15:14:40
62 192.168.10.32 [31/May/2015:19:47:57

How can get the result like
...
827
Posted By ashokvpp
echo...
echo "rta=58.124001ms;100.000000;150.000000;0.000000 pl=0%;5;15;0" | awk -F"[=;]" ' { print $2, $NF } '
58.124001ms 0

I just required 58.12 and 0.00 - Could you please assist.
827
Posted By ashokvpp
Rta data needs regexp
Hi

echo "rta=58.124001ms;100.000000;150.000000;0.000000"

I required 58.12 and 0.00 i,e from first and last.

I tried using : awk -F"rta=" '{print $2}' and last one awk -F";" '{print $4}'...
Forum: Web Development 01-23-2014
2,753
Posted By ashokvpp
Could you please advise what is appropriate. ...
Could you please advise what is appropriate.

Thanks
Forum: Web Development 01-23-2014
2,753
Posted By ashokvpp
Mod_rewrite - URL rewrite based upon HTTP_REFERER
Hello,

I have added following rewrite cond and rewrite rules but it does not work.

RewriteCond %{HTTP_REFERER} ^http://192\.168\.1\.150/categories/.*$ [NC]
RewriteRule ^(.*)$...
1,570
Posted By ashokvpp
The occurrences are just random number of...
The occurrences are just random number of times.. all I need is just print the 1st occurrence of the start pattern match..

---------- Post updated at 11:51 AM ---------- Previous update was at...
1,570
Posted By ashokvpp
Hi Scott, So far I have collected uniq...
Hi Scott,

So far I have collected uniq package names list.

Tried like:


$sed -n '/ChangeLog for: libblkid-2.17.2-12.9.el6_4.3.x86_64/,/Dependencies Resolved/p' centos6.txt
ChangeLog for:...
1,570
Posted By ashokvpp
Remove the duplicate content in a file
Here is the contents of test.txt



Dependencies Resolved
Changes in packages about to be updated:

ChangeLog for: 1:perl-Archive-Extract-0.38-131.el6_4.x86_64,

- Resolves: #915692 -...
970
Posted By ashokvpp
I found it. Posting here helps somebody.. ...
I found it. Posting here helps somebody..

cat sample | sed -n '/Changes/,/Dependencies/p'
Changes in packages about to be updated:

bash-3.2-32.el5_9.1.x86_64
* Thu Jun 27 22:00:00 2013 Roman...
970
Posted By ashokvpp
Grab contents between two patterns
Hi,

What is the best approach to grab contents between

Changes

Dependencies

from the following example snippy


Changes in packages about to be updated:

bash-3.2-32.el5_9.1.x86_64...
1,354
Posted By ashokvpp
Thanks :) created 2.
Thanks :) created 2.
Showing results 1 to 25 of 43

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