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

    Exchange tables /Partitions

    Hi, How can we exchnage partitions in Teradata as we do in oracle ? thanks
  2. Tdlearner

    commandline option

    How come the following works just fine in korn shell on command line ? listpage="ls | more" ; listpage thanks,
  3. Tdlearner

    GREPing large amounts of data.

    How about just using unix grep and word count. grep -c 'HidePrivacyStatement] t' /some/file/here.config | grep '1$' | wc -l Definitely, more efficient than making an array and browsing through it. thanks,
  4. Tdlearner

    Place semi-colon at the end of the last line

    I have bunch of sql files , all have select statements but semicolon missing at the end of the last lines. I have written the following sed script to add a semi colon at the end . file=$1 sed '$d' $file > ${file}.new sed -n '$p' $file | sed 's/$/ ;/g' >> ${file}.new mv ${file}.new $file I...
  5. Tdlearner

    Place semi-colon at the end of the last line

    How to place a semi-colon at the end of the last line for *.sql files in perl ? thanks,
  6. Tdlearner

    substitute white space

    Thanks a lot Miller for such a nice explanation. You have a deep understanding of PERL and more importantly, thanks for sharing. Thats really nice of you.
  7. Tdlearner

    substitute white space

    Thanks Miller, But in a way presence of g (global) is making or behave like and right ? Without g it would have simply remove space at beginning only not at the end . Pl correct if I inferred it wrong.
  8. Tdlearner

    substitute white space

    Hi, The following regex removes white space from head and tail of the line. perl -pe 's/^\s+|\s+$//g' How come it removes both ? It should just remove front because of presence of or (|). Looking it in boolean context, remove space from front or remove space from end. The first substitution...
  9. Tdlearner

    print blank lines

    Thanks Miller .
  10. Tdlearner

    print blank lines

    Thanks guys, Miller, I tried perl -n and it does the job but BUt why perl -p is also printing non-matching lines ? The following works but it also prints non-matching lines perl -pe 'if ($_ =~ /^$/) {$_ = "This is a blank line \n" }' blank.dat Output : Hello This is a blank line Second...
  11. Tdlearner

    print blank lines

    Hi Guys, I am trying to print blank lines on using perl command line. cat blank.dat Hello ### Blank line commented for visibility #### Second Blank Line ### Blank line commented for visibility #### Command 1 : perl -npe 'if ($_ == m/^$/) {print "This is a blank line \n"}' blank.dat Output...
  12. Tdlearner

    Perl syntax

    Thnaks Kevin.
  13. Tdlearner

    Perl syntax

    Hi All, Can anyone explain the following perl code implemented as a part of KSH script ? It increments the counter for env_var but where is the loop ? Is it a special syntax ? # abc.ksh perl -e $ENV{env_var}++; do abc.pl > abc.dat thanks

Part and Inventory Search

Back
Top