User Profile

Collapse

Profile Sidebar

Collapse
priyankapendkar
priyankapendkar
Last Activity: Jun 2 '11, 07:47 AM
Joined: Apr 7 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • priyankapendkar
    started a topic How to add vi command in shell script

    How to add vi command in shell script

    Hi,

    I need to delete all the lines which does not contain the "error" word in a file.
    so, in vi, I would use
    :v/error/d and then save the file.

    How can I achieve this in command line?

    Thanks in advance
    See more | Go to post

  • priyankapendkar
    started a topic how to define float number in shell script

    how to define float number in shell script

    #! /bin/bash
    x=5.2
    if [ $x -gt 7.5 ]
    then
    mail -s "$x is greater than 25" email@address
    fi

    when i run this code i am getting error intger expression required.

    plz tell me how to define this x ??
    See more | Go to post

  • priyankapendkar
    replied to How to do auto alert email?
    in Perl
    I have run the following command and I am getting the correct output means getting an mail on my email-id with subject “hi”

    mailx -s hi abc.xyz@companm .com



    --------------------------------------------------------------------------------------------------------




    If I want to use the same command in shellscript its not generating the mail

    Ex:-
    ...
    See more | Go to post

    Leave a comment:


  • priyankapendkar
    started a topic how to mail from unix shell script?

    how to mail from unix shell script?

    Hi,


    #! /bin/bash
    x=50
    if [ $x -gt 25 ]
    then
    mail -s "$x is greater than 25" email@address
    fi


    i have run this command on unix shell script...
    their is no error but i am not getting the mail
    can anybody tell me what may be the reason??
    See more | Go to post
    Last edited by sicarie; Apr 18 '11, 03:10 PM. Reason: removing email address from post

  • priyankapendkar
    replied to How to do auto alert email?
    in Perl
    Can u give me a simple example.
    Actully i am new to Auto Email, so want to know each step in detail
    See more | Go to post

    Leave a comment:


  • priyankapendkar
    started a topic How to do auto alert email?
    in Perl

    How to do auto alert email?

    Hi!


    I need to check everyday log file if anything “error” message on it? If answer yes I like to receive auto email. Please let me know how to write shell script for this auto alert email.plz help me as early as possible.

    Thanks and regards
    Priyanka
    See more | Go to post

  • priyankapendkar
    started a topic How to delete the lines from text file?
    in Perl

    How to delete the lines from text file?

    Hi

    i am having an text file

    test1.txt contains the following data:

    Code:
    Abcd
    2222
    ERROR:duplicate
    ERROR:Getinstrument
    ERROR:duplicate
    www
    xxx
    here i want the output which only contain the word error

    if i use the command :v/ERROR/d

    then output :
    Code:
    ERROR:duplicate
    ERROR:Getinstrument
    ERROR:duplicate
    ...
    See more | Go to post
    Last edited by miller; Apr 13 '11, 06:05 PM.

  • priyankapendkar
    started a topic Reasom for Memory Leakage?
    in Perl

    Reasom for Memory Leakage?

    In Perl
    i have run the following command

    $cpu=`ps -o pcpu -C sbd-java --no-heading`;

    i am getting the output

    CPU=2.5 or CPU=81.3 sometimes CPU=0

    I want to know why their is so much differnce in %CPU ?

    may be their is an problm of memory leakage or anything else.Can anyone tell me , what may be the reason?

    Thanks,

    Priyanka
    See more | Go to post

  • priyankapendkar
    started a topic How to store output into variable in perl
    in Perl

    How to store output into variable in perl

    Hi,

    Output of "ps -o etime,time,pcpu ,pmem,fname -C sbd-java"
    command is -
    Elapsed Time %cpu %MEM COMMAND
    02:14:03 00:03:28 2.5 6.3 sbd-java

    In shell script-(when i run below code)
    X=`ps -o etime,time,pcpu ,pmem,fname -C sbd-java --no-heading|awk '{print $3 }'`;

    echo $X

    output-2.5

    i want use same application in perl script....
    See more | Go to post
No activity results to display
Show More
Working...