04-15-2008
thank you
I use popen() function and it works ...
Thank you soo much ...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all
How can I setup my shell so that I run a set of commmands or a script every time I login. I am using kshell. I tried putting a line in ./.bash_profile (does not work)
Ex.: I want to use vi as the commandline editor so, I want to run the command: set -o vi (3 Replies)
Discussion started by: skotapal
3 Replies
2. Shell Programming and Scripting
Hello,
We have a requirement to disable running shell commands via vi using "!".
Can anybody please suggest how to disable this option.
The requirement arises because we open up a xterm window with a config file in vi mode for the customer to edit. After the customer edits the config... (1 Reply)
Discussion started by: Umesh_Sharoff
1 Replies
3. UNIX for Dummies Questions & Answers
Hi, I need help again. When I run this shell script, it only runs the unld_date.sql piece and exits. How can I structure this to run all the way to the end? When I don't have the unld_date.sql piece in here, everything runs fine from the date compare piece all the way to the end. Thanks in... (5 Replies)
Discussion started by: siog
5 Replies
4. UNIX for Dummies Questions & Answers
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Discussion started by: D.kalpana
1 Replies
5. Shell Programming and Scripting
I understand that in order to run basic unix commands I would normally type at the prompt, I would have to use the following format
system(ls -l);
or
exec(ls -l);
But when I actually try to use the command, the script fails to compile and keeps telling me there is an error with this line. ... (1 Reply)
Discussion started by: userix
1 Replies
6. Shell Programming and Scripting
Hi all,
In the directory '/temp/chris' the following files exist: chris.tar, chris.txt
What i am trying to do is to assign the 'chris.tar' filename in an argument through perl, in order to do that i use the system command:
$file=system("ls /temp/chris/*.tmp), but in the '$file' the exit... (2 Replies)
Discussion started by: chriss_58
2 Replies
7. Shell Programming and Scripting
Hello
I need to run some sed commands but it involves "/" in the substitute or delete, any ideas how I get round the problem.
Example:
cat file1.txt | sed -e '/</Header>/d' > file2.txt
This errors due to the forward slash before the Header text.
Thanks (3 Replies)
Discussion started by: Dolph
3 Replies
8. Shell Programming and Scripting
Hi,
I would like to write a script with include more than 6 unix commands.
my script like below:
echo " script started"
ls -ld
bdf | grep "rama"
tail -10 log.txt
...
..
...
now, i want to run above unix commands one by one.
example:
first the ls -ld command will be... (3 Replies)
Discussion started by: koti_rama
3 Replies
9. Shell Programming and Scripting
Executing two unix commads via perl script one after another
e.g: make clean
bsub -i -q short make
have tried using exec but the second command doesnt executes (1 Reply)
Discussion started by: rajroshan
1 Replies
10. Programming
Hi All,
Is there anything wrong with below syntax?
qx {perldoc -v ModuleName.pm | grep -i Description }
BTW, this question is related to Perl.
Thanks. (3 Replies)
Discussion started by: jal_capri
3 Replies
sa(8) System Manager's Manual sa(8)
Name
sa, accton - print process accounting statistics
Syntax
/etc/sa [ options ] [ file ]
/etc/accton [ file ]
Arguments
file With an argument naming an existing file, causes system accounting information for every process executed to be placed at the end
of the file. If no argument is given, accounting is turned off.
Description
The command reports on, cleans up, and generally maintains accounting files.
The is able to condense the information in into a summary file which contains a count of the number of times each command was called and
the time resources consumed. This condensation is desirable because on a large system can grow by 100 blocks per day. The summary file is
normally read before the accounting file, so the reports include all available information.
If a file name is given as the last argument, that file will be treated as the accounting file. The file is the default.
Output fields are labeled: "cpu" for the sum of user+system time (in cpu seconds), "re" for real time (also in cpu seconds), "k" for cpu-
time averaged core usage (in 1k units), "avio" for average number of I/O operations per execution. With options fields labeled "tio" for
total I/O operations, "k*sec" for cpu storage integral (kilo-core seconds), "u" and "s" for user and system cpu time alone (both in cpu
seconds) will sometimes appear.
Options
-a List all command names including those containing unprintable characters and those used only once. By default, places all command
names containing unprintable characters and those used only once under the name `***other.'
-b Sort output by sum of user and system time divided by number of calls. Default sort is by sum of user and system times.
-c Besides total user, system, and real time for each command, print percentage of total time over all commands.
-d Sort by average number of disk I/O operations.
-D Print and sort by total number of disk I/O operations.
-f Force no interactive threshold compression with option.
-i Do not read in summary file.
-j Instead of total minutes for each category, give seconds per call.
-k Sort by cpu-time average memory usage.
-K Print and sort by cpu-storage integral.
-l Separate system and user time; normally they are combined.
-m Print number of processes and number of CPU minutes for each user.
-n Sort by number of calls.
-r Reverse order of sort.
-s Merge accounting file into summary file when done.
-t For each command, report ratio of real time to the sum of user and system times. If the sum of user and system times is too small
to report, `*ignore*' appears in this field.
-u Superseding all other flags, print for each command in the accounting file the user ID and command name.
-v Followed by a number n, types the name of each command used n times or fewer. Await a reply from the terminal; if it begins with
`y', add the command to the category `**junk**.' This is used to strip out garbage.
Restrictions
Accounting is suspended when there is less than 2% free space on disk. Accounting resumes when free space rises above 4%.
Files
Raw accounting
Summary
Per-user summary
See Also
acct(2), ac(8)
sa(8)