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...
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...
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...
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...
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...
i have the following sed :
sed -e "s/|| 'Ç' ||/,/g" input > output
where input is
infield1 || 'Ç' ||
in2 || 'Ç' ||
lpad ( in3 ||
in4 ||
) || 'Ç' ||
in4 || 'Ç' ||
the || 'Ç' || are the field delimiters. The expected ouput is:
infield1 ,
infield1 ...
Hi,
iam trying to make the following transformation on the file:
print first line as it is!
from second line thru end -2 lines change from the SECOND FIELD ONWARD TOUPPER CASE (FIRST FIELD REMAINS IN LOWER CASE).
print the last two lines unmodified.
for eg:
input file:
record
string(") in1...
Hi,
i need to pull out field values( low and high) according to the following logic:
pullout the value from record 1, column 3 => low 1
jump down 12 records; pull out the value from column 4 =>high1
pull out the value from the next record( the very next subsequent record, i.e. record 13) =>...
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.