10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and
I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server
$ cat temp.txt
RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
2. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have 1000 *.txt files in a folder and I would like to rename them data1.txt through data1000.txt. The order does not matter or the names of the initial input files. How would I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
4. UNIX for Dummies Questions & Answers
Hi, Hope someone can help... I'm pretty much new to unix and can only do basic commands.
I have an issue where by every day I need to schedule a job to look in a folder with a name format of .IP. will be different each day (when the day is over the folder extension changes), and rename any... (5 Replies)
Discussion started by: Harsharan
5 Replies
5. Shell Programming and Scripting
Hello,
I want to rename more than 100 files. These files have "?" in there existing file name but I want to rename files to there first part before "?" token. I have tried using for loop but it isn't working so help following is the sample filename and for loop that am trying to use:
example of... (3 Replies)
Discussion started by: ls_lrta
3 Replies
6. Shell Programming and Scripting
Hi all,
I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date.
So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies
7. Shell Programming and Scripting
I splited a file into parts, then i wrote a script to convert the format of the file names to this: part1.dat part2.dat
but I wonder why part.dat is also created knowing that the k variable starts from 1
rm -f part*
$(split -b $1 file.1 part_)
set k = 1
for i in $(ls part_*)
do
mv -f... (1 Reply)
Discussion started by: saman_glorious
1 Replies
8. UNIX for Advanced & Expert Users
Guys, i need to replace a particular pattern in lots of files in a folder with another pattern . Is there any command line script I can use to do the functionality.
Eg: aalex > ls
green_1234_colour.max
red_1234_pen.max
yellow1234flower.max
Need to replace the 1234 in the file name with 9876... (4 Replies)
Discussion started by: appualex
4 Replies
9. Shell Programming and Scripting
Hi,
I have a fixed 4 files in each different directory. The total 17 directories are there each one having 4 files inside it. I need rename all of them with current date. The files formates will be as below:
Folder1:
abc_NOR_xyz_ddmmyyyy.txt
abc_NOR_ghij_ddmmyyyy.txt
Folder2:... (5 Replies)
Discussion started by: rjanardhan83
5 Replies
10. Shell Programming and Scripting
Hi,
I have a very urgent requirement here. I have to find all files in the specified directory but not in the sub directories(The directory name is stored in a variable) which are older than the current date as well as current time and rename it as filename_yyyymmddhhmmss.ext and move it into a... (7 Replies)
Discussion started by: ragavhere
7 Replies