Search Results

Search: Posts Made By: Yamaha Evans
8,268
Posted By DGPickett
If it works on the bash command line, and not in...
If it works on the bash command line, and not in a bash script, is the script really being bash interpreted, not sh? It must be chmod to executable as well as having the right path to bash on the...
8,268
Posted By bash-o-logist
#!/bin/bash # tested on bash 4 shopt -s...
#!/bin/bash
# tested on bash 4
shopt -s globstar
shopt -s nullglob
numfiles=0
for files in **/*.xls
do
cp -p "$files" /destination
((numfiles++))
done
echo $numfiles
8,268
Posted By DGPickett
Bash and some systems ksh can do this: find ....
Bash and some systems ksh can do this:
find . -type f -iname '*.xls*' | tee >(
cpio -dumpv /destination_path
) | wc -l | read cnt
Showing results 1 to 3 of 3

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