|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello there,
I need to write as Shell Script that records the users' activities in a time-stamped log file which is stored at a particular location from where the user can ftp the file to his desired location. Kindly help me with the code of this script. Thanking you Rahul Bhatnagar rahul-b@hotmail.com |
|
#2
|
|||
|
|||
|
You'd need something like:
Code:
date_var=`date +%Y%m%d%H%M%S`
target_dir=/a/place/to/put/thefile
base_name=userinfo
full_name=${target_dir}-${base_name}.${date_var}
command_to_get_output > $full_name 2>/my/error/logfile
within a script - change command_to_get_output to whatever command you need to run to get the output. If more than one command is needed don't forget to chnage the > to a >> to concatenate the output. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Unix Shell Scripting Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|