Thursday, April 3, 2014

perl language variables

We have learnt that Perl has following three basic data types:
  • Scalars
  • Arrays
  • Hashes
Accordingly we are going to use three types of variables in Perl. A scalar variable will precede by a dollar sign ($) and it can store either a number, a string, or a reference. A array variable will precede by sign @ and it will store ordered lists of scalars. Finally Hash variable will precede by sign % and will be used to store sets of key/value pairs.
Perl maintains every variable type in a separate namespace. So you can, without fear of conflict, use the same name for a scalar variable, an array, or a hash. This means that $foo and @foo are two different variables.


perl test console

perl -d -e 1
last one is number "1", not letter "l".

find current shell

ps -p $$

Wednesday, April 2, 2014

delete more line from vim

upper V,then upper G go to end of file,then x,it will delete filr content
or rm file,then touch to create a new empty file.

grep binary or hex search

grep -P "\x1A" file_name

for VIM  use /\%x1A or /\%x1a, "\%1A" is search pattern

Wednesday, March 5, 2014

Monday, March 3, 2014

JCO trace

SAP JCo offers two different ways to write trace files.
    1. Set the two options -Djco.trace_level= -Djco.trace_path= when you start the JVM.
    2. Call the methods JCO.setTracePath(String directory_of_trace_files) and JCO.setTraceLevel(int trace_level) in your Java program.

In both cases files of signature JCO*.trc are created in the defined directory directory_of_trace_file. The quantity of log information can be adjusted with the trace level. The additional logging that is switched on for certain trace levels is described below. For error diagnostic the trace level 5 is recommended.
  • 0: no trace files are written
  • 1: logging of the SAP JCo Java API is switched on
  • 3: logging of the SAP JCo JNI API is switched on
  • 5: important information for error diagnostic is switched on