![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing Filename as a Parameter to Another script | ravisg | Shell Programming and Scripting | 1 | 05-07-2008 11:28 PM |
| shortcut for tar cvf - [filename] | gzip > [filename].tar.gz | bcamp1973 | UNIX for Dummies Questions & Answers | 4 | 12-11-2007 05:45 PM |
| script to change filename with numbers | silversurfer202 | Shell Programming and Scripting | 5 | 11-10-2006 10:13 AM |
| read a part of filename from the list in the script | happyv | Shell Programming and Scripting | 3 | 10-20-2006 09:58 AM |
| How to send filename as variable in a shell script | gthokala9 | Shell Programming and Scripting | 6 | 06-27-2006 01:23 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
script -a filename
Dear All,
I have a small question but the answer might not be small ![]() I am using the following command "script -a filename" to record commands executed by user. As you know, the above command will print all what appears on the screen (commands and their output) to the filename. Is there a way, to print to the filename only the commands without the output of these commands??? Appreciate your help. |
|
||||
|
I understand what you have said but the .sh_history stores all commands entered by all users (i.e. its the shell history and not the user history). What i am looking for here is the user history.
The command i have mentioned eralier ( script -a filename) stores all the commands entered by the user who have looged into the system and the utput file which includes these commands will be saved once the session is terminated ot user logged out. The problem is that the above command will print the commands entered by the user along with their output, what i want to have is a file having only the commands (i.e. without the result of executing those commands).... Anyone can help with this???? |
|
||||
|
I agree with u that the .*_history stores the command for each user in their home directory. But what if i have 2 users having the same home directory, then how to distniguish shish user have enetered which commands (i.e. the .*_history will then be the history file for both users and not only for one of them since both having the same shell and the same home directory).
Any idea about this? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|