hi
suppose I want to create a report where it will shows the machine name, the date & time when the report is produced.
can anyone please help me to write such shell script?
requesting all.
Thanks
hi
suppose I want to create a report where it will shows the machine name, the date & time when the report is produced.
can anyone please help me to write such shell script?
requesting all.
Thanks
machine name get that from uname
date / time its from date
do you have any specific format as how it should be created ?
thanks matrixmadhan
yeah, as a text file report.
can u please tell me how can I create a text file report?
againg thanks a lot for help.
echo $(uname) > report
echo $(date) >> report
how can I see the report which has been created and where it will be created?
echo $(uname) > /dir1/dir2/report
echo $(date) >> /dir1/dir2/report
To view the report
cat /dir1/dir2/report
Just as you view any of your files the same way your report too should be viewed
For the question where it will be created?
You have the answer, as you are the creator !
its not working. says no such directory, then i created one using "mkdir dir1" command.
still its not working!!!!
Sample posted by anbu is really an example
and not the actual command that should be executed in your terminal.
you need to modify the command as per your needs
A direct example that could be run is,
echo $(uname} > file
would create a file named ' file ' in the current directory where you are executing the command!
Just for example i gave /dir1/dir2. Keep the file where ever you want to and use that path instead of /dir1/dir2/
thanks a lot anbu23 and matrixmadhan. its working!!!! yesssssss.....