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. Shell Programming and Scripting
The file starts like this:
Directory: <path to the script>
Script: <script fife name>
#!bin/ksh
##Comments
<actual script>
What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this,... (4 Replies)
Discussion started by: remytom
4 Replies
3. Shell Programming and Scripting
Hi
In directory /mnt/upload I have about 100 000 files (*.png) that have been created during the last six months. Now I need to move them to right folders. eg:
file created on 2014-10-10 move to directory /mnt/upload/20141010
file created on 2014-11-11 move to directory /mnt/upload/20141111... (6 Replies)
Discussion started by: primo102
6 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. Shell Programming and Scripting
Hi
I am looking for a help in designing a bash script on linux which can do below:-
1) Look in a specific directory for any new files
2) Mail the content of the new file
Appreciate any help
Regards
Neha (5 Replies)
Discussion started by: neha0785
5 Replies
6. Shell Programming and Scripting
Script must removes files from the first directory if there is a file with same name in the second directory
Script passed to the two directories, it lies with them in one directory:
sh script_name dir1 dir2
This is my version, but it does not work :wall:
set - $2/*
for i
do
set -... (6 Replies)
Discussion started by: SLAMUL
6 Replies
7. Shell Programming and Scripting
I want to capture a last file in a directory in a shl scrip
Cd to the directory
$last ls -1 *the_bills.dat* | tail -1
This is not problem, but I need to copy that file to another directory, but in order to be able to copy to that directory, I need to su in unix, I am sure my sistem... (2 Replies)
Discussion started by: rechever
2 Replies
8. Shell Programming and Scripting
Hello all.
I am new to this forum (and somewhat new to UNIX / LINUX - I started using ubuntu 1 year ago).:b:
I have the following problem that I have not been able to figure out how to take care of and I was wondering if anyone could help me out.:confused:
I have all of my music stored in... (7 Replies)
Discussion started by: marcozd
7 Replies
9. Shell Programming and Scripting
I saw many post about this but could not find a specific answer to this question.
i have the following code
find . -depth -name "$FILEEXT" -ctime -30 -exec rm {} \;
when i type ./deletefiles.sh *.txt for example, it will find all the txt files less than 30 days old and delete them.
my... (9 Replies)
Discussion started by: new2learn09
9 Replies
10. Shell Programming and Scripting
Hi ,
I am pretty new to scripting, and I trying to write a script which is not working as I expect to ....
I am trying to write a script which starts from top directory and tracks all the folders and sub-folders till it reaches a file and gives the list of files as output for a given... (2 Replies)
Discussion started by: Rahul00000
2 Replies