05-28-2007
Automatic name file with increase
Hello,
A file named c15a is registered on my disc all 10 minutes.
I must rename that file with the actually Date and with an automatic increase number on 5 digits, so as : c15a.20070528.00001 and the next file will be : c15a.20070528.00002.
The next day so tomorrow the five digits must be reset to 00001 so as for tomorrow : c15a.20070529.00001.
I have done the script with the rename with the date but i have a problem with the automatic increase number.
So can you help me with that increasing five digits number and automatic reset when the day changed.
So thanks a lot , bye.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello,
I am a beginner with korn shell scripting. I have got a text file that gets produced every night and I need to transfer it to a windows shared area.
Is there any command line script (e.g FTP) that I could use to transfer the file automatically without manual intervention everyday?
Any... (4 Replies)
Discussion started by: tagem
4 Replies
2. UNIX for Dummies Questions & Answers
Sorry im really new here this is my second post today!
My question is, im trying to write a script and i want to output to a text file but i want each text file to be different so for instance log.txt, log1.txt, log2.txt ect how would i do that? (7 Replies)
Discussion started by: chapmana
7 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
With curl I can fetch a tar archive from a web server which contains a file ending with .scf which I am interested in. Unfortunately the file name may vary and the subdirectory inside the tar archive may change. I can manually browse the directory structure and extract the file and then... (3 Replies)
Discussion started by: tkrahn
3 Replies
4. Solaris
Hi
I have a folder will all the file ftp in everyday. I have to go in every morning to check to see everynight have all the 2000+ file have been all FTP in.
so every morning i will check like this
# ls -l *_20080904*_20080904* |wc
if there is 2714 that mean is correct.
File name:... (13 Replies)
Discussion started by: summerpeh
13 Replies
5. Shell Programming and Scripting
i have got many files like this in my folder temp(say)
imp_02042008.txt for date 02-04-2008
imp_03092009.txt for date 03-09-2009
imp_25112009.txt for date 25-11-2009
...................
........
in some folder.
and one of my shell code uses one of the above files based on date.... (0 Replies)
Discussion started by: Maruti
0 Replies
6. Shell Programming and Scripting
i have got many files like this in my folder temp(say)
imp_02042008.txt for date 02-04-2008
imp_03092009.txt for date 03-09-2009
imp_25112009.txt for date 25-11-2009
...................
........
in some folder.
and one of my shell code uses one of the above files based on date.... (9 Replies)
Discussion started by: Maruti
9 Replies
7. Solaris
hi,
let me know how to increase file size in solaris 10 OS (4 Replies)
Discussion started by: meet2muneer
4 Replies
8. UNIX for Advanced & Expert Users
Hi All,
I have a query regarding the automatic patching on files in unix
Suppose I have a file names - abc.txt and I take its backup as abc.txt_bkp and then do some changes in abc.txt and save it as abc.txt_new.
Now I want to automatically apply the changes done on abc.txt to... (0 Replies)
Discussion started by: Shubham Aggarwa
0 Replies
9. Shell Programming and Scripting
hi everyone,
I just began to be interested about the bash access.
I buy a time ago a Raspberry pi, I installed raspbmc and now I would like build a bash to copy everyday all new files inside my server directly on the hard drive in my Pi.
So my HDD is directly plug on my pi with usb connect,... (4 Replies)
Discussion started by: nagito34
4 Replies
10. UNIX for Beginners Questions & Answers
Hello There,
Here is the use cases
Input folders
dropbox/project/abc/
dropbox/project/pqr/
dropbox/project/lmn/
dropbox/project/xyz/
Target Folders
/data/abc/
/data/pqr/
/data/lmn/
/data/xyz/ (2 Replies)
Discussion started by: TreasureCookies
2 Replies
LEARN ABOUT OSF1
atmhosts
atmhosts(4) Kernel Interfaces Manual atmhosts(4)
NAME
atmhosts - ATM host name file
DESCRIPTION
The atmhosts file is an ASCII file that contains an single-line entry for each host on the ATM network. Each entry consists of an ATM
host address, official host name, and any aliases.
Parameters are separated by spaces or tab characters. A number sign (#) indicates the beginning of a comment; characters up to the end of
the line are not interpreted by routines that search the file.
ATM host addresses are specified by an even number of hexadecimal digits. Each pair of digits represents 8 bits of address information.
An ATM address can be one of the following: An ATM End System Address (AESA) as registered with the network (19 bytes, or 38 hexadecimal
digits) A local Endpoint System Identifier (ESI) that is registered with the local switch (6 bytes, or 12 hexadecimal digits) An AESA with
selector byte, representing the address of a service on a remote machine (20 bytes, or 40 hexadecimal digits).
Note
By default, the atmhosts file contains an entry for Permanent Virtual Circuits (PVCs). The entry consists of an ATM address of 40 hexadeci-
mal zeros (0) and the host name PVC. Do not change or delete this entry.
FILES
ATM hosts file
RELATED INFORMATION
Commands: atmconfig(8), atmarp(8) delim off
atmhosts(4)