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 TouchToneTommy 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

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

    script to export and echo.

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

    script to export and echo.

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

    colums to rows transpose

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

    Rename / remove directory

    Thanks for your replies..but still have the undesired output rmdir: ./-ltr: No such file or directory regrads, chris
  11. 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
  12. 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.
  13. 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...
  14. christiniaroelin

    Date extraction using expr

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

    Printing previous lines !!

    Thanks a lot PHV and futurlet..!! Appreciate your time and help!! Regrads, Roelin!!
  18. 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-- )...
  19. christiniaroelin

    awk - execution control??

    As an eample: case ${channel} in < case code here> esac exec awk -v stream=$channel '{ line[NR] = $0 } END { i=NR system( "banner -***********- >> /production/temp/outnlod"stream".dat") system( "print VALIDATION PERFORMED ON- >> /production/sew/temp/outnlod"stream".dat") system( "date >>...
  20. 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...

Part and Inventory Search

Back
Top