Thanks! I had to change that to write to a variable, as it is in a script:
However, it fails on spaces. The linux-wife balance is greatly upset by demanding no spaces in filenames, so the DONT_COPY list looks more like this (sorry that I did not think of this earlier):
I tried replacing DONT_COPY in the second line with quotes, but this did not help (it created a different problem). How can I work with spaces in filenames?
I appreciate your patience and advice. I have googled this, but I can find no examples in which one is working with a list like this.
---------- Post updated at 11:30 PM ---------- Previous update was at 07:10 PM ----------
Hello guys it's me again, I need some help. What I'm doing is listing all the file and directories Recusively and using it a a master file. Then I need to do the same the nest day to make sure nothing was deleted or modified. What happen is file in one of out major directories was deleted without... (2 Replies)
Hi All I have two scripts which i used to try and list all the directories one using 'function', which only lists the first directory and does not show directories within directories.
function ListDir ()
{
for arg in $(ls $HOME)
do
if
then
echo $arg
... (2 Replies)
I have a text list of about 3,000 file names (image files), which exist on a server and that I want to copy over to another location. I understand the Unix cp code, but what's the string to have it copy multiple files based on an external list?
Many thanks! (4 Replies)
Hi,
I'm looking to delete some files from directories.
I've just put in a file the location of these files.
e.g:
in file supprs.txt there is:
/usr/host/t1.txt
/etc/dev/u1.java
/home/new/files/view.c
Is it possible to take this file "supprs.txt" as a parameter in a shell command ? (2 Replies)
Hello all,
I'm trying to copy all files within a specified directory to another location based on a find filter of mtime -1 (Solaris OS). The issue that I'm having is that in the destination directory, I want to retain the source directory structure while copying over only the files that have... (4 Replies)
Hi,
I need to edit an xml file as such
<B="A"><!]></B>
so that the output is
<A><!]></A>
This is a massive xml file and the A B and C are always different however the output should always be the same.
Does anyone know any solution to this please?
thanks in advance (2 Replies)
Hi All,
Please help.
I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here
file1
dir1
dir2
dir3
dir4
file2
dir5
dir6
dir7
dir8
file3
dir9
dir10
dir11
dir12 (6 Replies)
Hi,
I have a command in my bash script, searchDirectoryName.sh:
DIR_NAME=$(find . -type d)
echo "${DIR_NAME}"
.
./Dir1
./Dir1/1.0.2.1
./Dir2
./Dir2/1.1
./Dir3
./Dir3/2.2.1
How can I select only following directory names with second subdirectoies and without first ./ in the... (3 Replies)
Dear All,
I have a situation where I want to copy some files of type .txt.
These files are o/p from one program. Some of the files are named as
fileName .txt instead of fileName.txt
after fileName by mistake I have specified "space". Now I want to move these files as follows.
mv fileName*... (13 Replies)
guys, i did create a script but its too long, though it function the same.
# cat nightlyscan.sh
#!/usr/ksh
deyt=`date +"%Y-%m-%d"`
for i in `ls -lrt|grep $deyt|awk '{print $9}'`
do
cp -f $i /S1/Sophos/logger/
done
#
but i did not paste it all.
this is the desired. (9 Replies)