shell script with parameters?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers shell script with parameters?
# 1  
Old 04-02-2011
shell script with parameters?

hi , I wanted to create a script, and I have no idea how to, and I would appreciate any help on that. Any advice on solving this is welcome. Thanks

Here it goes:
make a shell script in bash that show the activity of users. The results should be a summary or a complete report in a file. Everything should be indicated by these parameters: -a showing the users' files modified in the last 24 hours
-p showing the processes separated by execution status for each user
-/ show how many connections and total time have done the users in the last week
-c nn, shows the last nn executed commands for each user in terminals.
--u user, verify that these are real system users otherwise show an error
-t hh:mm, indicate the interval whenever the script is executed to monitor the users.
-f file, file where the report should be saved for each user.
# 2  
Old 04-02-2011
Is this homework?
# 3  
Old 04-02-2011
no, i'm trying to solve old papers i had when i was at uni, because i'm now beggining to use linux and free software in general. The thing is that I couln't solve the ones I posted, that's why I posted them here. If it looks like homework, please forgive me and don't reply Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

2. Shell Programming and Scripting

How can I fetch few parameters in Shell script?

Hi All, I want to fetch few details out of a huge output of AWS CLI tools : I am using this command : ec2-describe-instances (6 Replies)
Discussion started by: Palak Sharma
6 Replies

3. Programming

csh: Parameters in Shell Script Help

I have a program that is designed to take the first parameter (a file extension) and use it to rewrite the file stored in the second paramerter with the new extension. And if the current file does not exist then the program will print an error message "No such file." For example, my program is... (1 Reply)
Discussion started by: Marhsall34
1 Replies

4. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

5. Shell Programming and Scripting

want to pass parameters to awk script from shell script

Hello, I have this awk script that I want to execute by passing parameters through a shell script. I'm a little confused. This awk script removes duplicates from an input file. Ok, so I have a .sh file called rem_dups.sh #!/usr/bin/sh... (4 Replies)
Discussion started by: script_op2a
4 Replies

6. Shell Programming and Scripting

Parameters for function in Shell script

Hi, I am having a function inside a shell script. The Shell script is called with parameters and one of the parameter is passed to a SQL script inside the function. But when the function is called inside the shell script, the SQL script is not called. Do the shell parameter has to be... (3 Replies)
Discussion started by: srimenon09
3 Replies

7. Shell Programming and Scripting

Accessing the parameters of a shell script

Hi, I have one situation. I am developing a shell script to which parameters will be passed from a Web based User Interface using some Business Process(BP).There are some 6 parameters for which user will enter the values in UI. These values will be passed to script by BP in the form -... (2 Replies)
Discussion started by: The Observer
2 Replies

8. Shell Programming and Scripting

Calling sql in shell script with parameters

Dear All, I want to call an sql script within a unix shell script. I want to pass a parameter into the shell script which should be used as a parameter in teh sql script. e.g $ ./shell1.sh 5000129 here 5000129 is a prameter inside shell script i am calling one sql script e.g. ... (2 Replies)
Discussion started by: Radhe
2 Replies

9. Shell Programming and Scripting

help me in sending parameters from sqlplus script to unix shell script

Can anybody help me out in sending parameters from sql*plus script to unix shell script without using flat files.. Initially in a shell script i will call sql*plus and after getting some value from some tables, i want that variable value in unix shell script. How can i do this? Please tell me... (2 Replies)
Discussion started by: Hara
2 Replies

10. Shell Programming and Scripting

Number of parameters to a shell script

Is there any restriction on number of parameters can be passed on to the shell script? I found, after 9th parameter for parameter 10, it is taking parameter 1. (1 Reply)
Discussion started by: videsh77
1 Replies
Login or Register to Ask a Question