Search Results

Search: Posts Made By: Y-T
1,383
Posted By ctsgnb
maybe smthg like : ( find...
maybe smthg like :

( find ./@(sourceA|sourceB) -type f -prune) | grep -f textfile | while read a
do
cp $a target/${a##*/}
done
5,314
Posted By Scrutinizer
OK, maybe I should have said: That is bash shell...
OK, maybe I should have said: That is bash shell code, not POSIX compliant shell code, so it will only work in bash or maybe ksh93. :)

---------- Post updated at 10:22 ---------- Previous update...
5,314
Posted By frans
Simple while read file do rm -f FolderB/$file...
Simple
while read file
do rm -f FolderB/$file
done < <(ls FolderA)
5,314
Posted By summer_cherry
for i in FolderA;do ls ${i}/* | while read...
for i in FolderA;do
ls ${i}/* | while read file;do
tfile=`basename $file`
if [ -f FolderB/${tfile} ];then
rm FolderB/${tfile}
fi
done
done
5,314
Posted By kurumi
#!/usr/bin/env ruby -w require 'fileutils' ...
#!/usr/bin/env ruby -w

require 'fileutils'
Dir["./A/*"].each do |d|
name=File.basename(d) if File.directory?(d)
if File.exists?("B/"+name)
print "#{name} exists in #{"B/"+name}\n"
...
5,314
Posted By cola
#!/bin/sh vr=$(ls /path/to/FolderA) for fl1...
#!/bin/sh
vr=$(ls /path/to/FolderA)
for fl1 in ${vr};do
echo "${fl1}"
done

vr2=$(ls /path/to/FolderB)
for fl2 in ${vr2};do
echo "${fl2}"
done

Now make two arrays to save the...
5,314
Posted By rdcwayx
in ubuntu, you should be able to diff the folder...
in ubuntu, you should be able to diff the folder directly.

diff /path/to/FolderA /path/to/FolderB
1,591
Posted By Scrutinizer
Try this: while read -r line do printf...
Try this:

while read -r line
do
printf "%s\n" "$line" | cat fileB - > "$line"
done < fileA
1,591
Posted By Scrutinizer
Try something like this: i=1 while read -r...
Try something like this:
i=1
while read -r line; do
printf "%s\n" "$line" | cat fileB - > file$i
i=$((i+1))
done < fileA
or
i=1
while read -r line; do
cp fileB file$i
printf "%s\n"...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy