Search Results

Search: Posts Made By: mrn6430
13,199
Posted By Don Cragun
I am certainly not a perl expert, but from what I...
I am certainly not a perl expert, but from what I know about REs, the following should do what you want:
perl -nle '/<MSGCODE>([^<]*)</ and print $1' file
which, if file contains the data above,...
8,282
Posted By drl
Hi. Running: date -d "2016-12-30 23:50:33...
Hi.

Running:
date -d "2016-12-30 23:50:33 GMT"
produces:
Fri Dec 30 17:50:33 CST 2016
For my time zone (Central).

In your case you would probably do something like:
date -d "$( cat...
8,282
Posted By jim mcnamara
Solaris 10 ksh was ksh88 variant, not ksh93. If...
Solaris 10 ksh was ksh88 variant, not ksh93. If I remember, dtksh is also available - a sort of proto-version of ksh93. (corrected - thanks jlliagre)

If you have installed gnu coreutils:


...
8,282
Posted By jlliagre
Dtksh has no relationship with zsh. It is...
Dtksh has no relationship with zsh.
It is actually the original version of ksh93 (M-12/28/93d) with added builtin support for X11 and Motif.
8,282
Posted By Don Cragun
Hi mrn6430, There are so many things wrong here...
Hi mrn6430,
There are so many things wrong here that I don't know where to start...

In post #3 you said:

Note that your code sets a variable named LOG_TIME to a value containing four strings...
8,282
Posted By jlliagre
Actually not, the original ksh93 (thus dtksh)...
Actually not, the original ksh93 (thus dtksh) didn't implement --version yet.

The original ksh93 wasn't supporting either printf as a builtin. It was introduced, including the %T format...
8,282
Posted By jim mcnamara
@jlliagre - thanks for the correction, I typed...
@jlliagre - thanks for the correction, I typed zsh in error.
13,199
Posted By RudiC
WHERE to store that number? Try awk 'match...
WHERE to store that number? Try
awk 'match ($0, /<PORTED_NUM>[0-9-]*<\/PORTED_NUM>/) {print substr ($0, RSTART+12, RLENGTH-25)}' file
990-799-1234
13,199
Posted By Aia
Please, try the following: perl -nle...
Please, try the following:

perl -nle '/<PORTED_NUM>([\d-]*)</ and print $1' mrn6430.xml
13,199
Posted By RavinderSingh13
Hello mrn6430, Kindly change awk to nawk or...
Hello mrn6430,

Kindly change awk to nawk or /usr/xpg4/bin/awk and then it should fly.

Thanks,
R. Singh
13,199
Posted By stomp
Hi, I have some package here on my debian...
Hi,

I have some package here on my debian box which is called xml-twig-tools containing a program called xml_grep(a perl script) . I'm sure there are a bunch of xml-tools out there. I think within...
13,199
Posted By greet_sed
Hi, IMO, if it is xml file with proper xml...
Hi,

IMO, if it is xml file with proper xml syntax then xmllint is better choice.

Read man xmllint for detailed information.


echo "cat...
Forum: Solaris 03-09-2016
9,438
Posted By jlliagre
1) Yes, you can exclude multiple directories,...
1) Yes, you can exclude multiple directories, here is one way:

tar cvfXX /export/home/backups/$audit-Data-$useday.bkup.tar <(echo /Data/ssg/output/) <(echo /Data/ssg/someOtherDirectory/) /Data
...
Forum: Solaris 03-09-2016
9,438
Posted By jlliagre
There is no --exclude option with tar, this is a...
There is no --exclude option with tar, this is a GNUism.

You might use this syntax:

tar cvfX /export/home/backups/$audit-Data-$useday.bkup.tar <(echo /Data/ssg/output/) /Data

Alternatively,...
Forum: Red Hat 08-31-2015
3,466
Posted By TioTony
The network outage sounds like the culprit. Post...
The network outage sounds like the culprit. Post an update after the reboot, which hopefully will resolve it for you.
Forum: Programming 08-20-2015
1,864
Posted By Corona688
Why is sqlplus in backticks? Why not run...
Why is sqlplus in backticks?

Why not run sqlplus once for 10,000 statements instead of 10,000 times for 10,000 statements? Connection overhead can be significant.

There is no point putting cat...
Forum: Programming 08-21-2015
1,864
Posted By Don Cragun
Borrowing heavily from Corona688, I assume you...
Borrowing heavily from Corona688, I assume you mean something like:
( count=0
echo "SET ECHO OFF NEWP 0 SPA 0 PAGES 0 FEED OFF HEAD OFF TRIMS ON TAB OFF"
while read tn
do echo...
Forum: Red Hat 04-29-2015
1,754
Posted By MadeInGermany
They mean that $USER is set by some shells only. ...
They mean that $USER is set by some shells only.
I have always used "${USER:-$LOGNAME}" therefore - display LOGNAME if USER is not set.
BTW you can simplify the shell code to...
Forum: Red Hat 11-08-2014
1,420
Posted By Don Cragun
That isn't the way cron works. The crontab...
That isn't the way cron works. The crontab entry:
50 6 8-31 * 0 ksh /home/cpac/SPID_Files/GetFiles.ksh
specfies that the command ksh /home/cpac/SPID_Files/GetFiles.ksh is to be run at 06:50 on...
Forum: Red Hat 11-08-2014
1,420
Posted By jim mcnamara
Don's very clear message is that both day of the...
Don's very clear message is that both day of the week and day of the month are both going to act independently to run the job at 6:50 AM

You have to check either the day of the week or the day of...
4,593
Posted By blackrageous
Did you try transerring your public key via sftp...
Did you try transerring your public key via sftp to the server so that you would not have to prompt for a password. Note: sftp provides a batch (-b) mode but it's not for entering a password. You...
Forum: Linux 07-01-2014
2,266
Posted By MadeInGermany
Yes, you got it. You certainly want | grep...
Yes, you got it.
You certainly want | grep '\.gtt$'.
And you can augment your case statement with a last switch:
*) echo "$file: bad region $filer" ;;
Forum: Red Hat 04-22-2014
1,417
Posted By Scrutinizer
Yes it is the traceroute command. What happens...
Yes it is the traceroute command. What happens when you try it without options?
Showing results 1 to 23 of 23

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