Search Results

Search: Posts Made By: J-Man
1,037
Posted By J-Man
Bit of sed help in XML
Hi all, need some help seeing the bug in my SED

Source XML
<SMART_FOLDER JOBISN="1" SUB_APPLICATION="PMT-APB" MEMNAME="Job0" JOBNAME="PMT-APB" FOLDER_NAME="PMT-APB">
</SMART_FOLDER>

My SED...
1,584
Posted By J-Man
I'm running on AIX, but get an error message...
I'm running on AIX, but get an error message "cannot be parsed"


AIX an05074 1 6 00F61FD34C00
$ sed '/AUTOEDIT EXP/{s//VARIABLE NAME/; s/=/" VALUE="/2}' test.xml
sed: 0602-404 Function...
1,584
Posted By J-Man
Thanks, that helped a lot with that issue. I...
Thanks, that helped a lot with that issue.

I also messed up the first grab though
AUTOEDIT EXP=\"[a-z]*[0-9]*=Is not finding
AUTOEDIT EXP="%%S_APP_HOME=
For the random variable names what is...
1,584
Posted By J-Man
sed xml file script help
I have about 1200 xml files I need to deploy from a 6.4 XML version to 9.0 version of a DTD. So I need a sed command to do lots of of replacements of random variables.

The keyword line is...
Forum: AIX 03-06-2014
6,075
Posted By J-Man
Thanks everyone the issue is fixed. I removed...
Thanks everyone the issue is fixed. I removed three secondary groups from pcadmin and the file access resumed.

Cause was the NFS hard limit of 16 groups.
Forum: AIX 03-06-2014
6,075
Posted By J-Man
Thanks for all the great input everyone. Here is...
Thanks for all the great input everyone. Here is some more background data,

The folder permissions are,
$ ls -ld /bp_data/frm/pr/ParamFiles/PFMBT
drwxrwsr-x 2 pcadmin utl 4096...
Forum: AIX 03-05-2014
6,075
Posted By J-Man
[Solved] AIX not following permission rules on group
Has anyone ever encountered this? It's one of those it was working Monday but not today issues.

We have an account pcadmin in the group utl, its supposed to read the files in utl. No issues on...
1,302
Posted By J-Man
Yep that works to, thanks. The complexity is a...
Yep that works to, thanks. The complexity is a little over my head I'll read up on it.
1,302
Posted By J-Man
[solved]Help with a sed command
So I have a bunch of strings in a file.

Example Line
./prcol/trt/conf/conf-app/jobdefinition/trt-pre-extr-trt-step.jdef

Intended Result
pre-extr-trt-step


So far I have parsed it out to...
1,676
Posted By J-Man
Found the issue, the guy who wrote the...
Found the issue, the guy who wrote the /etc/init.d/ldap_dscc assumed root would run the stop and put su - infra all over the script.

Got them to add
NOT_INFRA="su - infra -c "
if [[ "$(whoami)"...
3,022
Posted By J-Man
For safety sake I would change if [...
For safety sake I would change

if [ $tomcat_status = $TOMCAT_RUNNING ];

to

if [[ $tomcat_status == $TOMCAT_RUNNING ]];
1,676
Posted By J-Man
Forcing a tty session but getting a password prompt?
I have a master host I want to use to issue some start/stop of LDAP services.

I changed the client hosts /etc/sudoers to have
Defaults:infra !requiretty

The master host kicks off the jobs...
1,647
Posted By J-Man
Thanks for all the info, I ended up using agama...
Thanks for all the info, I ended up using agama (https://www.unix.com/members/302081960.html)'s example.

But I also found this works pretty good.
echo 'dv01:at01,at05,at02:at04' | sed 's/:....//g'...
1,647
Posted By J-Man
Question on my sed command
So I have this sed command below. The content of the tmp.txt file is

dv01:at01,at05,at02:at04


sed 's/\:.*\,/\,/g' tmp.txt

Which produces
dv01,at02:at04
and I'm trying to use sed to...
2,213
Posted By J-Man
Thanks good points on the &&, forgot about that...
Thanks good points on the &&, forgot about that one.
2,213
Posted By J-Man
Thank you sir, that did fix it, no need to sed...
Thank you sir, that did fix it, no need to sed now.

I just can't seem to fully wrap my head around any complex sed/awk stuff. Bean reading this Sed - An Introduction and Tutorial...
2,213
Posted By J-Man
Ok so I wrote a function to fix up the XML ...
Ok so I wrote a function to fix up the XML


function scanInsertUD
{
#set -x
CTM_FILE=$1
TMP_FILE=/tmp/ud.$$

# Reformat XML file
# Remove developer added user daily
sed...
2,213
Posted By J-Man
Thanks I'll try it out Monday morn.
Thanks I'll try it out Monday morn.
2,213
Posted By J-Man
Found an exception to the above I need to handle...
Found an exception to the above I need to handle now.

The XML can have the following

<SCHED_TABLE DATACENTER="ctmwk05" TABLE_NAME="BPR-PP-CCR" USED_BY_CODE="0">
<JOB
NAME="x"
DATE="y"...
2,213
Posted By J-Man
The TABLE_NAME is used on many lines, but I only...
The TABLE_NAME is used on many lines, but I only want to edit lines that have both SCHED_TABLE and that TABLE_NAME value.

Your sed command works great on my test file. I'll run it against a...
2,213
Posted By J-Man
More sed/awk help
I was using the search button, but was unable to locate this specific example.

I'm looking to find a wildcard string and if found insert some extra string.

Here is the full string
...
7,457
Posted By J-Man
Thanks cfajohnson and edidataguy. I did...
Thanks cfajohnson and edidataguy.

I did finally get it to work with sed, thanks.


GREP_FOR='<\/JOB>'

sed '
/'${GREP_FOR}'/ i\
<QUANTITATIVE NAME="'${QR_NAME}'" QUANT="1" \/>
'...
7,457
Posted By J-Man
My problem with sed, and its my inexperience with...
My problem with sed, and its my inexperience with the command is sed syntax

sed '/abc/123/' <file name>

All the xml tags and inserts have their own / part of the xml syntax.

So I'm...
7,457
Posted By J-Man
sed wont work its not a replace The text...
sed wont work its not a replace

The text example would look like


75: </ON>
76: </JOB>
77: <JOB
78: APR="1"


So I have my new insert string
<QUANTITATIVE NAME="DB-BLODS"...
7,457
Posted By J-Man
Insert text at line number
I wrote a script to grep for a closing XML node. Then I need it to navigate up a line and insert some XML. Then go to the next occurrance. I have this


INSERT_NODE='<QUANTITATIVE...
Showing results 1 to 25 of 25

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