Execute one by one
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.
Can anyone tell me the syntax of the script. N.B. The user name will be mentioned in an array within the shell script. |
What is the context of this? e.g. how will this be used?
What specific information do you want to collect? (Give an example of a command that will be used in the script) |
to collect users history
|
Please give me a complete answer to my question!!
For example, collect user's history for what purpose? What is an example of a command that you want to run? (Or perhaps a log file?) What specific data about the user are you looking for? |
>> collect user's history for what purpose?
For reporting purpose >>What is an example of a command that you want to run? cat command to view users history >>What specific data about the user are you looking for? All history or may be there will some option to ask which command i wanna search for. |
I'm sorry, but you are going to have to provide more information for anyone to give you much help.
Have you looked in the various logs in /var/log? Here is an example of some commands---do any of these relate to what you are trying to do? http://www.thegeekstuff.com/2009/03/...stem/#more-435 Quote:
Quote:
|
Hye
this definitely sounds like home work. @jeesun: defining nothing and not answering questions the correct way, not showing what you did before asking here, does not show that you are a Linux user willing to learn anything. If you do not know anything about shell scripting and syntax, you should first read Bash programming guide. After that play around with what you wanna do, then come back with real questions. Sorry if my answer is not very polite, but i read dozens of such questions every day here. |
No, its not like that home work.
I'm just really stuck to write the shell script. I have some users in an array USRS="jeesun jeesunb jeesunc" While I read the users using for...do loop it only read one user from USRS array and shows the output. for uss in $USRS do I just forgot the exact loop which will read users from USRS one by one and execute until the last one. |
Quote:
To iterate thru a list that is stored in a variable like this: Code:
for name in $(echo $USRS); do |
All times are GMT -5. The time now is 03:21 AM. |