Search Results

Search found 14 results on 1 pages for 'arav'.

Page 1/1 | 1 

  • Regarding String manipulation

    - by arav
    I have a String str which can have list of values like below. I want the first letter in the string to be uppercase and if underscore appears in the string then i need to remove it and need to make the letter after it as upper case. The rest all letter i want it to be lower case. "" "abc" "abc_def" "Abc_def_Ghi12_abd" "abc__de" "_" Output: "" "Abc" "AbcDef" "AbcDefGhi12Abd" "AbcDe" ""

    Read the article

  • Regarding UNIX Shell Script

    - by arav
    When there is no files inside the folder the below script goes inside the for loop. Not sure what i can modify so that it doesn't go inside the for loop. Also when there is no files inside the directory exit status should be success. Wrapper script checks the exit status of the below script FILESRAW ="/exp/test1/folder" . for fspec in "$FILESRAW"/* ; do echo "$fspec" if [[ -f ${fspec} ]] ; then ..... processing logic else ... processing logic fi done

    Read the article

  • Regarding Unix shell script

    - by arav
    I want to retrieve the file from the INFILE directory which are begining with the file names prefix "BBSCGG_" or "BCT_" or "ACL_" or "ASC" and do the processing inside the for loop INFILE=/ext/test/fil1/ for infile name in file prefix ... if [[ -f ${fspec} ]] ; then processing logic else processing logic done how can i do it

    Read the article

  • Regarding Shell Script

    - by arav
    I have the below line in the unix shell script. I want to exclude test.jar in WEB-INF/lib being added to the CLASSPATH. How can i do it? for file in WEB-INF/lib/*jar ; do CLASSPATH=$CLASSPATH:$PWD/$file done

    Read the article

  • Regarding Java String dollar to cents conversion

    - by arav
    I have a java string which has an dollar value and cents value after decimal points and starting with a + or - sign. I want to convert into cents and store it in a integer (it can have + or -). Also i need to check if the cents part (after decimal point) not more than 2 digits and throw an error message if exists example : String dollval= "12.23" ,"12","-0.09", "-99","-99.0", "-99.23","0.00" int dollint = 1223,12,-9,-99,-00,-9923,0

    Read the article

  • Regarding BigDecimal

    - by arav
    i do the below java print command for this double variable double test=58.15; When i do a System.out.println(test); and System.out.println(new Double(test).toString()); It prints as 58.15. When i do a System.out.println(new BigDecimal(test)) I get the below value 58.14999999999999857891452847979962825775146484375 I am able to understand "test" double variable value is internally stored as 58.1499999. But when i do the below two System.out.println i am getting the output as 58.15 and not 58.1499999. System.out.println(test); System.out.println(new Double(test).toString()); It prints the output as 58.15 for the above two. Is the above System.out.println statements are doing some rounding of the value 58.1499999 and printing it as 58.15?

    Read the article

  • shell script passing arguments

    - by arav
    From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position. valArgs() { until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done } main() { valArgs "$@" $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

    Read the article

  • shell script passing subset of arguments

    - by arav
    From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position. valArgs() { until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done } main() { valArgs "$@" $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

    Read the article

  • Regarding grep in solaris

    - by Arav
    I want grep for a particular work in multiple files. Multiple files are stored in variable testing. TESTING=$(ls -tr *.txt) echo $TESTING test.txt ab.txt bc.txt grep "word" "$TESTING" grep: can't open test.txt ab.txt bc.txt Giving me an error. Is there any other way to do it other than for loop

    Read the article

  • Regarding Shell variable

    - by arav
    I need to call another shell script testarg.sh within my main script. This script testarg.sh has arguments ARG1 ,ARG2, ARG3. I need to call up the below way ./testarg.sh -ARG1 -ARG2 -ARG3 ARG1 and ARG3 argument Variables are mandatory ones. If its not passed to the main script then i quit. ARG2 is an optional one. If the ARG2 variable is not set with value or it's not defined then i need not pass it from main script.So i need to call up the below way ./testarg.sh -ARG1 -ARG3 If the value exist for the ARG2 Varibale then i need to call the below way ./testarg.sh -ARG1 -ARG2 -ARG3 Do i need to have a if else statement for checking the ARG2 variable is empty or null. Is there any other way to do it.

    Read the article

  • Regarding PID Shell Script

    - by arav
    I am calling another shell script testarg.sh within my main script. the logfiles of testarg.sh are stored in $CUSTLOGS in the below format testarg.DDMONYY.PID.log example: testarg.09Jun10.21165.log In the main script after the testarg process gets completed i need to grep the log file for the text "ERROR" and "COMPLETED SUCCESSFULLY". How do i get the PID of the process and combine with DDMONYY for grepping. Also i need to check whether file exists before grepping $CUSTBIN/testarg.sh $CUSTBIN/testarg.sh rc=$? if [ $rc -ne 0 ]; then return $CODE_WARN fi

    Read the article

1