Hi, I am using a XML file in server location which contains some attributes and value.I just want to replace the attribute value inside the tag keeping the complete line and xml file intact. I am looking for Regular expression which can search for attribute name and replace the attribute value with the provided one. Please find below property details.
<server>
<mbean code="com.xyz.domain.wsmq.WSMQConnectionFactory"
name="xyz.qps:service=MQQueueConnectionFactory">
<attribute name="QueueManagerName">QMSTR01</attribute>
<attribute name="HostName">xx.yy.zz.ww</attribute>
<attribute name="Channel">channel01</attribute>
<depends>jboss:service=Naming</depends>
</mbean>
</server>
Hai to all,
While am trying tp add in ldap database i am getting the following error.
[root@Testing openldap]# ldapadd -x -D "cn=Manager,dc=testdomain3,dc=com" -f yuvraj.ldif -w secret
adding new entry "dc=testdomain3,dc=com"
ldap_add: Undefined attribute type (17)
additional info: employeeNumber: attribute type undefined
[root@Testing openldap]# cat yuvraj.ldif
#Entry 1
dn: dc=testdomain3,dc=com
description: LDAPDB
objectClass: top
employeeNumber: 1000515
nationality: India
fn: yuvraj
sn: singh
sex: Male
age: 31
o: Cricket
ou: Batsman
displayName: singhy
uidNumber: 5155555
cn: yuvraj singh
userPassword: s
Please suggest.
Distro : CentOS 5.5
Thanks in advance..
Hello there,
First of all thank you for making me a part of this forum.
Secondly, here is the problem..
I am facing this problem in honeyd installation during "make"
root@kali:~/Desktop/Narayan/honeyd-1.5c# sudo make
make all-recursive
make[1]: Entering directory `/root/Desktop/Narayan/honeyd-1.5c'
Making all in .
make[2]: Entering directory `/root/Desktop/Narayan/honeyd-1.5c'
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./ -I./compat -I/usr/local/include -I/usr/local/include -I/usr/local/include -O2 -Wall -g -DPATH_HONEYDINCLUDE="\"/usr/local/include/honeyd\"" -DPATH_HONEYDDATA="\"/usr/local/share/honeyd\"" -DPATH_HONEYDLIB="\"/usr/local/lib/honeyd\"" -DHONEYD_PLUGINS_DECLARE="" -DHONEYD_PLUGINS="" -DPATH_RRDTOOL="\"\"" -c honeyd.c
In file included from honeyd.c:97:0:
tagging.h:89:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
tagging.h:89:6: error: expected declaration specifiers or ‘...’ before ‘(’ token
In file included from stats.h:36:0,
from honeyd.c:98:
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:26:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:28:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:30:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:32:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored [-Wattributes]
make[2]: *** [honeyd.o] Error 1
make[2]: Leaving directory `/root/Desktop/Narayan/honeyd-1.5c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Desktop/Narayan/honeyd-1.5c'
make: *** [all] Error 2
I found a similar thread in this forum as well to solve the above problem by using "apt-get install honeyd" but didnt quite worked for me.
root@kali:~/Desktop/Narayan/honeyd-1.5c# apt-get install honeyd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package honeyd
I tried researching but couldnt find any solutions. Moreover, I am really a newbie at Kali Linux and other debians as well.
I would appreciate if somone could help me.
Thank you.
Hi there,
Trying to compile a few Gfortran lines in Ubuntu 12.04 I get this error:
Quote:
lun = newunit(unit)
1
Error: Dummy argument 'unit' of procedure 'newunit' at (1) has an attribute that requires an explicit interface for this procedure
The number one in fact points to the word "unit" not "lun" in the terminal. It got left-shifted when posted.
The code itself:
Code:
program main
INTEGER*4 counter,lun,unit
REAL*8, parameter :: pi = 3.141592653589793
unit = 10
lun = newunit(unit)
...................
end program main
What does it all mean and how shall I change the code to compile it without an error?
Thanks, - A.
i need a bash script to switch to zero second on ac the waiting time for turning off the monitor (highlighten in red). same as for on battery (highlighten in purple)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-power-manager" version="1.0">
<property name="xfce4-power-manager" type="empty">
<property name="power-button-action" type="empty"/>
<property name="show-tray-icon" type="empty"/>
<property name="logind-handle-lid-switch" type="bool" value="true"/>
<property name="dpms-on-ac-sleep" type="uint" value="1"/>
<property name="dpms-on-ac-off" type="uint" value="2"/>
<property name="brightness-on-battery" type="uint" value="9"/>
<property name="dpms-on-battery-sleep" type="uint" value="1"/>
<property name="dpms-on-battery-off" type="uint" value="2"/>
<property name="lock-screen-suspend-hibernate" type="bool" value="false"/>
<property name="dpms-enabled" type="bool" value="true"/>
</property>
</channel>
Hi all ,
I have a requirement where I have a file. Contents of the file are :
#comments
VAR="abg"
RES=123
#comments
IC6790ABG="https://www.abc.com"
IC5678-vg="https://www.bhy.com"
IC-gy_567:78="https://www.gyt.com"
#comments
The variable names can not have characters like - , : so
in this file I have to find words starting with IC and replace characters like - ,:
I want to change only the variable name , not the whole line.
I have used SED command
sed -i '/^IC/s/[^0-9 a-z A-Z _]*//g' file
when I am using this command , it is replacing the whole line
output becomes :
#comments
VAR="abg"
RES=123
#comments
IC6790ABGhttpswwwabccom
IC5678vghttpswwwbhycom
ICgy56778httpswwwgytcom
#comments
But I want the output like this :
#comments
VAR="abg"
RES=123
#comments
IC6790ABG="https://www.abc.com"
IC5678vg="https://www.bhy.com"
ICgy_56778="https://www.gyt.com"
#comments
How can I get the desired output , thanks for your help in advance .
i had a problem, i installed and config squid on fedora complete but when i start service squid not success it was display job for squid.service fail. See "systemctl status squid.service" and "journalctl -xe" for details please help me
Hello guys. When ever i tried to run CRCN protocol i am getting following error:
harsh@ubuntu:~/ns3/test$ ns test1.tcl
num_nodes is set 10
missing operator at _@_
in expression "$i < $val(ni) _@_$val(channum) "
(parsing expression "$i < $val(ni) $val(cha...")
invoked from within
"for {set i 0} {$i < $val(ni) $val(channum) } {incr i} {
$ns_ add-channel $i $chan_($i)
}"
(file "test1.tcl" line 48)
Can someone guide me how to correct this error??
Thank you
Hello
I have a text file which has blocks like
Code:
dir1/dir2/dir3/name_run_number1:
line1_run_number1_part1
line2_run_number1_part2
line3_run_number1_part3...
Each block is separated with a blank line and there is the ":" in the "header" of each one while each block carries the same "number1" after "run_" suffix
What I want to do is for each block, extract the "number1" as shown in the first line and then for the lines below count from 1-20 and give a message if a "partX" line is missing. Any bash or python would be fine
Thanks
Dear All
I need your help.
I want to get a file from windows server using ftp.
Below is the script I have created but the connection is not established:
#!/bin/sh
lcd "directory in linux server"
USER="username of windows server"
PASS="password"
ftp -n "ip of windows server" <<EOF
user $USER $PASS
cd "C:\Users... directory in windows server where file is located"
bin
get test1234.txt
bye
EOF
I hope somebody can help me!
BR,
ok so im using osx 10.6.8 but i have something with linux on it somewhere I can try this on if that is the problem
I am attempting to take certain parts out of a html file I have figured out how to write a regular expression to specify this data I want to delete using the search funciton in the text editor TextWrangler:
(?<=<div id="right_col">)[\s\S]*(?=</body>)
This works in text wrangler but when I try to use it with sed it gives me errors like this one:
sed: 1: "(?<=<div id="right_col" ...": invalid command code (
I know to use -e to avoid problems with the unix version OSX is based on. The sed is a bit different because its based on an older unix variant but i did that and its still giving me an error. I assume there is something basic I am missing about formatting your regular expression for using with commandline and what characters you can use. I bet it has something to do with the backslashes or the round brackets. normally I would just keep searching till I find the answer but I am bored of this problem. I need to think about something else for awhile. maybe in the meantime someone else can chime in and help me out.