view file using shell scripting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ilikesuresh
    New Member
    • Aug 2007
    • 47

    view file using shell scripting

    Hi,
    My requirement is to view the certain file from unix shell(korn).
    What i did is
    Code:
    $SQLPLUS -S $sql_user_name/$sql_user_pwd@$sql_service
    exec emp_history();
    commit;
    .
    .
    .
    vi /suresh/emp_his.txt
    After executing the procedure,the procedure is updating certain things in to a file.I want to see this updation with out quiting the program.Then finally the control will come to our program.
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by ilikesuresh
    Hi,
    My requirement is to view the certain file from unix shell(korn).
    What i did is
    Code:
    $SQLPLUS -S $sql_user_name/$sql_user_pwd@$sql_service
    exec emp_history();
    commit;
    .
    .
    .
    vi /suresh/emp_his.txt
    After executing the procedure,the procedure is updating certain things in to a file.I want to see this updation with out quiting the program.Then finally the control will come to our program.
    Well, you don't need a script to view a file. And, how are you going to view the file if the script is opening it? I don't think that putting "vi ....." into a shell script will really do anything as how are you going to navigate the file and exit it? Vi is interactive with the user, not a script.

    Also, you say you want to see the updates to the file (updation really isn't a word, see your spell checking). What are you expecting to see if you don't want the file quoted?

    Regards,

    Jeff

    Comment

    Working...