get the total execution of command


 
Thread Tools Search this Thread
Operating Systems Solaris get the total execution of command
# 1  
Old 01-31-2011
get the total execution of command

hi,

i have to get the info between start to stop of a command execution
suppose,
if we execute the command like pkgadd [pkgs] then while its executing it ask some questions , i have to get total information untill pkgadd command complete into a perticular file.
# 2  
Old 01-31-2011
I assume you want a transcript of the session?

Use the 'script' command.

Code:
$ script
Script started, file is typescript
$ echo "blah"
blah
$ exit
Script done, file is typescript
$

The 'typescript' file will contain all of the commands and output.
# 3  
Old 01-31-2011
that is fine but whenever u type $script it shouldn't ask for new commands it should take predefined command automatically.
# 4  
Old 01-31-2011
I'm unable to discern what it is you're actually after, but if you mean you wish to use a pre-canned set of responses to pkgadd, then see the "-r" flag for pkgadd, which allows you to specify a response file.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

2. Shell Programming and Scripting

Want to terminate command execution when string found in the command output

Hi Experts, I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task. I am running below command to snmpwalk the router.. snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies

3. Solaris

Need command to know the total size

:mad:i need command to know the total size of project in my system by Giga bit i try #du -s /*/projectname but i need total size for this project by G.B can you help me (6 Replies)
Discussion started by: ayman
6 Replies

4. Shell Programming and Scripting

Command to find total cpu and mem

Hi All, I need to know the command for knowing the total cpu and mem. Thanks (5 Replies)
Discussion started by: aish11
5 Replies

5. Solaris

command to get the total disk space (available + free)

is there a command to get the total disk space (available + free) on the solaris server ? thanks (3 Replies)
Discussion started by: sudhiroracle
3 Replies

6. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

7. Shell Programming and Scripting

sed command to get the total lines

hi, I am using the following code to get the first field of all the lines in a file using sed command.But its not printing the last line.Why it is so and how can i read the different fields of each line ? code: for i in $(sed = filename.txt | sed 'N;s/\n/ /' | cut -d " " -f1) do val1=`sed... (5 Replies)
Discussion started by: Sharmila_P
5 Replies

8. UNIX for Dummies Questions & Answers

grep running total/ final total across multiple files

Ok, another fun hiccup in my UNIX learning curve. I am trying to count the number of occurrences of an IP address across multiple files named example.hits. I can extract the number of occurrences from the files individually but when you use grep -c with multiple files you get the output similar to... (5 Replies)
Discussion started by: MrAd
5 Replies

9. HP-UX

Easy one : command listing total memory

Hi, I have been searching for a command that lists the total amount of memory in the HP-UX doc but haven't found it yet. vmstat is not exactly what i want. Does the command exists on HP UX? :confused: :confused: :confused: :confused: :confused: (4 Replies)
Discussion started by: beginer
4 Replies
Login or Register to Ask a Question