Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. christiniaroelin

    SUBSTR with Delimiter

    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...
  2. christiniaroelin

    export with switch operators

    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...
  3. christiniaroelin

    SED for regexp

    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...
  4. christiniaroelin

    script to export and echo.

    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...
  5. christiniaroelin

    colums to rows transpose

    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...
  6. christiniaroelin

    Rename / remove directory

    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
  7. christiniaroelin

    appending text to EOF

    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.
  8. christiniaroelin

    expr - date issue

    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...
  9. christiniaroelin

    Date extraction using expr

    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
  10. christiniaroelin

    Listing directories within a fislesystem

    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
  11. christiniaroelin

    Printing previous lines !!

    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-- )...
  12. christiniaroelin

    awk - execution control??

    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...
  13. christiniaroelin

    regexpr in SED

    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 ...
  14. christiniaroelin

    UPPER CASE Transformation

    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...
  15. christiniaroelin

    record field extraction

    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) =>...

Part and Inventory Search

Back
Top