10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
2. Programming
hi all,
this is my script and as you can see in the screenshot i attach its not deleting the directory in the source folder
#!/bin/bash
cd /vol/cha-work/_ARCHIVE/to_be_archived/audio/robert_test
temp=/mnt/robert_test/temp
dest=/vol/cha-archive/audio
echo "is this archive for an... (2 Replies)
Discussion started by: robertkwild
2 Replies
3. Shell Programming and Scripting
Hi,
Could you please assist how to move the gz files which are older than the 90 days from one folder to another folder ,before that it need to check the file system named "nfs" if size is less than 90 or not. If size is above 90 then it shouldn't perform file move and exit the script throwing... (4 Replies)
Discussion started by: venkat918
4 Replies
4. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
5. UNIX for Dummies Questions & Answers
Hi Folks,
There is a job which generates a .zip files every day at /usr/app/generated directory , now please advise for the script that will delete this zip files permanently.but while deleting it should make sure that it will not delete the last two days recently generated zip files and this... (1 Reply)
Discussion started by: punpun66
1 Replies
6. UNIX for Dummies Questions & Answers
Hey guys,
I am looking for simple shell script, so i can remove every second file in a directory.
For example in any given directory there are 10.000 files:
0001.jpg
0002.jpg
0003.jpg
0004.jpg
0005.jpg
0006.jpg
0007.jpg
0008.jpg
....
1111.jpg
1112.jpg
etc.
After running the... (5 Replies)
Discussion started by: alpha_mouse
5 Replies
7. Shell Programming and Scripting
Hello forum members,
I am writing a script to two tasks.
1: displaying the list of the files in the current directory.
2: removing the specifed file from the list.
I have written a sample script ,so can u please verfiy and correct.
echo Enter list of files
ls *.txt
read textfile
rm -f... (3 Replies)
Discussion started by: sivaranga001
3 Replies
8. Shell Programming and Scripting
Hi,
I have shell script which is located in /opt/Test/test.sh
code in test.sh is as follows
#!/bin/sh
rm -rf /opt/Test
exit 0
when I tried to execute the above script from its location, it shows the following error
rm: Cannot remove any directory in the path of the... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies
9. Shell Programming and Scripting
Hi guys,
I am working with a script within a Mac OS X package installer. The package installer will run the bash script once the files have been copied/installed. I have a little trouble with the last line of my script causing the package installer to crash once in a while and I have narrowed it... (1 Reply)
Discussion started by: tret
1 Replies
10. Shell Programming and Scripting
Hi I need to write a shell script which basically searches for all the empty files within the directory structure, lists them before asking the user to confirm if they would like to delete them. If the user deletes the file then a notice would appear confirming the file is deleted.
I've be... (5 Replies)
Discussion started by: cat123
5 Replies