02-19-2009
Quote:
Originally Posted by
Shahul
Hi,
Sorry Not sure what you are trying to say...
if you want to change file name with respective timestamp then..
we can use below command inside script.....
cp 1233743158.log `date +%Y%m%d%H%M%S`.log
what else you want to do here..
Thanks
Sha
if using your command only can copy the file to current time not file's real time
1233743158.log is a file name
"1233743158" is a unix time format
it's require to a script "convertime.sh" to convert unix time format to real time format like 20090204183010 -- YYYYMMDDHHMMSS
if run the script convertime.sh like below
# ./convertime.sh -d 1233743158 +%Y%m%d%H%M%S
result printout
20090204182558 <--readable time for the file 1233743158
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends
I have an requirement that i need to generate html file using script.
and the script output shold keep adding to that html file like tablewise.
can anyone please help me out in this.
thanks
Krish. (2 Replies)
Discussion started by: kittusri9
2 Replies
2. Shell Programming and Scripting
How can I generate a list of numbers and place all of these numbers in a line-by-line into a file.
I am new to scripting actually.
0501000000 to 0509999999
i.e.
0501000000
0501000001
......
0509999999
set 02
0551000000 to 0559999999
i.e.
0551000000
0551000001
......
0559999999
... (3 Replies)
Discussion started by: noo
3 Replies
3. Shell Programming and Scripting
Hello,
I have the line underneath generated by lssyscfg command:
"""51/client/1/pcyaz0hjfv00-vio1/651/c050760107fd0466,c050760107fd0467/1"",""52/client/2/pcyaz0hjfv01-vio2/652/c050760107fd0468,c050760107fd0469/1"",""31/client/1/pcyaz0hjfv00-vio1/375/c050760107fd046a,c050760107fd046b/1"""... (1 Reply)
Discussion started by: khalidou13
1 Replies
4. Shell Programming and Scripting
Hi all,
can anyone tell me how to generate control+c interrupt through shell script. (2 Replies)
Discussion started by: rohitmahambre
2 Replies
5. Shell Programming and Scripting
Hi
I created a gnupg password which I later forgot clumsy enough (after a holiday). I can always create a new one but unfortunately I have some files on the computer that I encrypted with it and would like to access it. I remember parts of the password and was wondering what's the the best way to... (0 Replies)
Discussion started by: zaonline
0 Replies
6. Shell Programming and Scripting
I need to write a shell script that will do all this:
Go to server directory, for example (/xyz/outbound)
In the outbound folder, get the list of the (old) directories created or modified at least two days before the date when script is run.
The list will have the names of directories, some... (2 Replies)
Discussion started by: chako_3
2 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have a file "test" with data as below
1,APRIL,NEW,"New market,delhi,pune,India",RECENT, 254664
2,MARCH,OLD,"New Area,Mumbai,UP,India",CURRENT, 152483
So I want a script which provides output as below
1,APRIL,RECENT,254664
2,MARCH,CURRENT,152483
I am aware we can use awk/sed... (9 Replies)
Discussion started by: sv0081493
9 Replies
8. Shell Programming and Scripting
Hi,
I've written a shell script with proper intentation and commenting structure. However, I would like to generate documentation for the shell which I have written. Is there any tool as such to generate it like we have javagen/docgen ?
Please help.
Thanks,
Arjun (0 Replies)
Discussion started by: arjun_arippa
0 Replies
9. UNIX for Beginners Questions & Answers
I have an interactive script which sorts and processes a variety of filetypes from an unsorted folder into newly created directories.
The script works great, But I was wondering how I could generate a script with an inverse action so that I could unwind / undo the executed script and its sorting... (3 Replies)
Discussion started by: Braveheart
3 Replies