10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I need to add a part of folder name to the files inside it. For instance the file is
HMCBackup_20150430.155027.tgz
and it is under directory /nim/dr/HMCBackup/cops22
I need to add cops22 to the file name so as it would be cops22_HMCBackup_20150430.155027.tgz
Any help in doing... (10 Replies)
Discussion started by: hasn318
10 Replies
2. Shell Programming and Scripting
hi,
i have some files in a directory say
abc.txt
def.txt
ghi.txt
i am storing these file names in a temp file.
ls -l | grep "^-" | awk '{print $NF}' > temp_file$$
i want to add a date time stamp at a particular place in the file names.
it can be
1) before the extension... (2 Replies)
Discussion started by: Little
2 Replies
3. Shell Programming and Scripting
Hi all,
I have a folder with a bunch of files in them, and I would like to add an extension (.mp3)to all these filenames. The folder has only files that I'd like .mp3 added to.
It looks something like this:
Intput:
File1
File2
File3Output:
File1.mp3
File2.mp3
File3.mp3Thanks in... (2 Replies)
Discussion started by: repiv
2 Replies
4. Shell Programming and Scripting
Hi
I have a cron job setup that searches for 'core dump' files in a fixed set of directories and moves the core files to a separate file system.
I am able to add date and time info to the file name.
How can I add the source directory path to the file name?
In case anyone is wondering why I... (5 Replies)
Discussion started by: dexter126
5 Replies
5. Shell Programming and Scripting
I have files named like ABAB09s099E1AAV1.pdf and ABAB09s099E2AAV1.pdf in a directory. I need to add _Lop in the end of the name, like ABAB09s099E1AAV1_Lop.pdf for all files. For files with E2 in the name I also have to replace 99 with 88 in the filename, that would be ABAB09s088E2AAV1_Lop.pdf
... (3 Replies)
Discussion started by: hakkar
3 Replies
6. Shell Programming and Scripting
Hi,
I'm reading data from comma separated files to DB. Now there is a need to have the name of the input file in each row of that file. How can I do this in unix script?
Example:
$cat file1
value11,value12, value,13
value21,value22, value,23
value31,value32, value,33
And the result... (2 Replies)
Discussion started by: tmikahan
2 Replies
7. Shell Programming and Scripting
Hi All,
I have a script to convert a file and output the filename with "_output", however it not work. Can help?
echo Please input list file name:
read listn
for file in `cat $listn.txt`
do
convert $file > $file_output
Thanks all!! (3 Replies)
Discussion started by: happyv
3 Replies
8. Shell Programming and Scripting
Does anyone know how to add a timestamp to a file's name extension in a shell script? Please help.. (3 Replies)
Discussion started by: walterja
3 Replies
9. UNIX for Dummies Questions & Answers
Hi
I want to add the date to a filename in a script I have.
So I want
exp myfile01-FEB-2005.dmp
How do I get the 01-FEB-2005 in there?
Cheers
Rich (3 Replies)
Discussion started by: richard1975
3 Replies
10. UNIX for Dummies Questions & Answers
whats going on guys. below is a script i made and am just curious if there is a "time stamp" command. so i can set the timestamp in a filename.
#! /bin/ksh
#
# This scripts takes a list of files in the INDIR variable and compairs it to a list of files that are open in the same directory.... (2 Replies)
Discussion started by: Optimus_P
2 Replies