First thing to say is that I am entirely new to Shell Scripting and am trying to write a script to do something I thought would be relatively simple, but has escaped me.
Essentially, I want to take file name information from a list, find the files listed and then copy the results into an output directory. As a standard command line I use this:
This is fine, but a bit difficult to explain to new users of Linux, so I was looking to simplify this into a script
eg:
search_copy_list [which list] [output dir]
I have had a look around, but the fundamental basics are escaping me, I can't seem to find any help on how to index the list to find the files.
If anyone could help, that would be awesome because I'm missing something here.
Thanks
Adrian
Last edited by Franklin52; 06-16-2011 at 03:49 AM..
Reason: Please use code tags
Hi,
I have a large series of directories and subdirectories with many jpgs in them. I need to do two things:
1. Create a copy of each jpg found within it's own subdirectory
2. Rename this copied jpg such that apple.jpg becomes apple_m.jpg
I have tried to run the following commands in... (1 Reply)
Hi
I'm trying to writte a script (crontab) to copy files from one location to another... this is what i have:
find . -name "VPN_CALLRECORD_20130422*" | xargs cp "{}" /home/sysadm/patrick_temp/
but that is not working this is the ouput:
cp: Target... (5 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi I am new to unix and need some help, the main reason I am here is because i need basic unix knowledge
The... (2 Replies)
I need to write a perl script to search for a specific set of numbers that occur after a series of words but before another. Specifically, I need to locate the phrase today at the summit, then immediately prior to the words tonnes/day copy the number that will be between 100 and 9,999, for example,... (1 Reply)
Ok, so here is what I am looking for..
Shell script that uses find to look for one days worth of data using the modified date and then copies only those files to a specified directory.
I figured I could use grep and the find command to do this. It seems to work just fine from what I can... (4 Replies)
Hi Gang, I am an old unix user and just recently returned in the flavor of a Mac. I have tons of pictures in the .orf format and would like to write a script to:
Search the Hard drives for that file type
Then, depending on date, copy it to a specific folder
If there is an exact... (2 Replies)
HI admin unix,
I'm from indonesia that currently work as system admin for server under AIX/UNIX environment.
I have some trouble when running script as follow :
##
vdate()
{
sqlplus -s ${MMUSER}/${PASSWORD} <<-eot|grep -v '^$'
set heading off feedback off
select... (2 Replies)
Hi All,
I am new to UNIX. I will be thankful if some one helps me.
I have to write a shell script for one of the requirement.
I have files created from Jan 2006 to March 2008.
My requirement is to write a script in such a way that
1) To find and copy(not Moving) the files created in the... (2 Replies)
I'm having a little trouble finishing up this script any help would be great.
My system is SCO OpenServer Enterprise System (ver 5.0.5m) and i'm using sh
This script checks todays date and goes and downloads a file with yesterdays date in the name.
---start----
Server="ipaddresshere"... (4 Replies)
Afternoon,
I have a problem with the FIND and GREP commands working together.
The command that I am typing is this:-
find . -name *.sql -print --- This finds all files with an SQL suffix
I then want to examine all those files to check for the existence of a string in them.
I am... (2 Replies)