Hi group,
Im pretty new to rexx-coding. I'm trying to substr 'JKLMN' from abc.def.ghi.JKLMN
Is there a way to substr using "." as a delimiter??
Please advice on the above. I could achieve the above by providing hardcoded position as values for SUBSTR function, which may not be the case in...
Hi group,
I have an export statement as
export DIR=${DIR:-"subdir"}
Im trying to understand, whether, tha above statemnt will export DIR with value set in the env, and if not set then only picks subdir as default value. Please let me know if my understanding is correct on the above.
Thanks...
PHV,
Thanks for your help.
It works fine except for that it wrote lines only having an echo. i have in the datd file additional lines that doenot start with echo which need sto eb written to output also.
for eg:
input file
echo $ES_LD_END_HR='16'
some lines without echo
echo $xxx_HR='21'...
Hi,
i need to select only the lines that start with "echo" and within those lines delete anything after "=" including the "=" also.
for eg:
echo $ES_LD_END_HR='16'
should be
echo $ES_LD_END_HR
i have a sed statement as
sed '/^echo\(.*\)=\(.*\)/echo\2/g'< in.dat > out.dat
but gives an...
PHV,
The problem is that the file doenot have export stetment.
the data file (/tmp/variadates.dat)looks like
END_DAY='21'
END_HR='16'
MIN='03'
MTH='11'
END_YR='05'
EXT_ENDED='MONDAY NOVEMBER 21ST, 2005 16.03.27'
EXT_START='MONDAY NOVEMBER 21ST, 2005 15.59.58'
i need to export each of these...
PHV,
thanks for your quick response.
I need to prefix the variables in a file with export sattement and run it. Since there are thousands of records in the file, i would nee dto loop it may be awk.
could you please guide me to achieve this.
thanks
Christi.
Hi gurus,
i have a file variab.dat which has thousands of line as below
END_DAY='21'
END_HR='16'
MIN='03'
MTH='11'
END_YR='05'
EXT_ENDED='MONDAY NOVEMBER 21ST, 2005 16.03.27'
EXT_START='MONDAY NOVEMBER 21ST, 2005 15.59.58'
my requirement is to export these vaiables to env.
export env...
Mufasa,
What is the venue for your output?...Is it for
- display to the screen
If the output is a-c, above, do you want
delimited columns, delimited by:
- tabs
What is the maximum number of transposed rows-to-columns for a single CUST_ID
- unknown. This could be anywhere...
Hi
I have the query that returns the following data:
CUST_ID DT SUM(Scrpt_CNT)
---------------- --------- ---------------------
901 28-OCT-05 0
903 07-OCT-05 0
903 14-OCT-05 0
903...
Folks,
Im trying to rename or remove a directory named '-ltr' which was created in error. The problem being faced is that when used with "mv" / "rmdir" command , it treats the dir name -ltr as flag...is there any way to get arround this??
Thanks
Chris
Guru's
Im trying to append a text to the end of a file:
INPUT FILE :
i am
learing
sed.
TEST TO APPEND:
today
DESIRED OUTPUT FILE:
i am
learing
sed.
today
please provide with any insights.
Thanks Much.
Hi,
Im facing the following issue while running the below script:
output from the script : 0 6
required output : 06
#! /bin/ksh
export stamp=${stamp- "$(printf $(expr `date '+%m'` - 1 ))"}
echo $stamp
if [ $month -lt 10 ]
then
export stamp=0$stamp
fi
print $stamp
Please advice on the...
Sam,
Thanks for your input..that worked fine..but i get the integer output. say instead of 06 the output is 6.i tried having a printf ..but wasnt successful.
Could you please advice on this
thanks
Christinia
Hi,
I was facing problems with executing the following code:
#! /bin/ksh
export stamp=${stamp-"`"(expr $(date"+%m") -1)"'"}
echo $stamp
please advice on the right syntax.
Thanks
Christinia
HI,
Im trying to list all the directories conatined within 10 different filesystems. Could you please let me know how to achieve this??
Thank You,
Roelin
Hi all,
I have the following code:
awk ' { str[NR] = $0 } END {
if ( ( $0 ~ / files found/) && ( $2< '$min_file'))
{
print $2 " files found : WARNING : EXPECTED MINIMUM NUMBER OF FILES " "'"$min_file"'" "\n\n"
print NR
for ( i=NR; i>(NR-5) ; i-- )...
Hi all,
i have two awk seperate statements in a script. But only the first one gets excuted and then exits. i replaced the second one with just a print statement as a test but i find the control not being passed after the excution od the first awk.. is this the normal behaviour of awk or is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.