Sponsored Content
Top Forums Shell Programming and Scripting How to run unix commands in a new shell inside a shell script? Post 94810 by hkapil on Wednesday 4th of January 2006 05:56:40 AM
Old 01-04-2006
Thanks it worked

Thanks Prederabo !!!!,
It worked for me...
The remaining commands ran in the newly created shell..
Thanks again ...
hkapil
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run an SQL script inside a shell

How do I create a K Shell which would silently (without user input) logon to Oracle and run an SQL script? Any help will be greatly appreciated. Steve (1 Reply)
Discussion started by: stevefox
1 Replies

2. Shell Programming and Scripting

shell script to run a few commands help!

Hi friends this is first post i am very new to shell scripting so i require your expertise to do the following thank u I need to write a shell script which will run the following commands pg_dump bank > backup(Enter) Wait for bash prompt to appear coz it indicates that the command is... (23 Replies)
Discussion started by: perk_bud
23 Replies

3. Shell Programming and Scripting

How to use ftp commands inside shell script? Help please

Dears, I'm new in shell scripting and i need your help, i would like to know how can i create a script to ftp to a certain unix/linux machine/server IP address and get a file for example without user intervention? How can i force the script to use a certain username and password to access this... (4 Replies)
Discussion started by: Dendany83
4 Replies

4. Shell Programming and Scripting

Unix commands failing inside the shell script

When my script deals with large input files like 22Gb or 18 GB the basic commands like sort or join fails when run from inside the shell scripts. Can there be any specific reason for this? For e.g. sort -u -t "," -k1,1 a.csv > a.csv.uniq" sort -u -t "," -k1,1 b.csv > b.csv.uniq" The... (3 Replies)
Discussion started by: esha
3 Replies

5. Shell Programming and Scripting

shell script to run commands in different terminals

hi, how to write shell script that runs different commands(like:ls,ps,ls-l) in differnt terminals(each command should run in different terminal). my main motive is to run different 'c' program exe's available in different locations in different terminals. thanks sai (2 Replies)
Discussion started by: saidopdf
2 Replies

6. UNIX for Dummies Questions & Answers

Commands to run from shell script

Hi script> isumid 98765432 if i give above command in cmd prompt it is running the same thing if i give inside the shell script it is not working below is the code #!/bin/bash isumid 98765432 please give me a solution (16 Replies)
Discussion started by: Ramrangasamy
16 Replies

7. Shell Programming and Scripting

Run .exe inside shell script

I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using %BASH% --login -i "/cygdrive/d/script.sh" , where %BASH% is an environment variable in Windows set to C:\cygwin\bin\bash.exe. I have a created a Cygwin environment variable $EXE_PATH =... (3 Replies)
Discussion started by: HemanthJayasimh
3 Replies

8. Shell Programming and Scripting

RMAN commands inside crontab shell script

Hello I'm trying to write simple script to delete archive logs for RMAN, unfortunately it's not working, I tried two way to do that: #!/bin/ksh echo "Start ....." rman target=/ << EOF RUN { delete force noprompt archivelog until time 'sysdate-10'; } EXIT; EOF echo "END ..." echo... (6 Replies)
Discussion started by: samer.odeh
6 Replies

9. Shell Programming and Scripting

How to run scripts parallely inside shell script?

Hi , I have 4 scripts example script1,script2,script3,script4 . I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies . Once script1,script2 and script3 got completed successfully , I have to trigger script4. Can someone help me on this how to... (10 Replies)
Discussion started by: vinothsekark
10 Replies

10. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies
LASTCOMM(1)						    BSD General Commands Manual 					       LASTCOMM(1)

NAME
lastcomm -- show last commands executed in reverse order SYNOPSIS
lastcomm [-f file] [command ...] [user ...] [terminal ...] DESCRIPTION
lastcomm gives information on previously executed commands. With no arguments, lastcomm prints information about all the commands recorded during the current accounting file's lifetime. Option: -f file Read from file rather than the default accounting file. If called with arguments, only accounting entries with a matching command name, user name, or terminal name are printed. So, for example: lastcomm a.out root ttyd0 would produce a listing of all the executions of commands named a.out by user root on the terminal ttyd0. For each process entry, the following are printed. o The name of the user who ran the process. o Flags, as accumulated by the accounting facilities in the system. o The command name under which the process was called. o The amount of cpu time used by the process (in seconds). o The time the process started. o The elapsed time of the process. The flags are encoded as follows: ``S'' indicates the command was executed by the super-user, ``F'' indicates the command ran after a fork, but without a following exec(3), ``C'' indicates the command was run in PDP-11 compatibility mode (VAX only), ``D'' indicates the command terminated with the generation of a core file, and ``X'' indicates the command was terminated with a signal. FILES
/var/account/acct Default accounting file. SEE ALSO
last(1), sigaction(2), acct(5), core(5) HISTORY
The lastcomm command appeared in 3.0BSD. BSD
December 22, 2006 BSD
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy