Hi
Thank you again.
rename command is not available.
I had to amend the above because I have a file without the brackets too.
for file in *(*)*
do
nfile="`echo "$file" | sed 's/(.*)//'`"
if [[ $file != $nfile ]]; then
mv $file $nfile
fi
done
Hi
Thank you for that but I had an error see below.
#for file in *(*)*; do echo mv "$file" "${file//\(*\)}"; done
sh: "${file//\(*\)}": The specified substitution is not valid for this command.
Hi
I have files where the name contains brackets. I would like to remove the brackets from the names. I am using ksh.
The files before:-
abc1(1).ctl
abc2(1).ctl
abc3(1).ctl
abc4(1).ctl
I would like to change them to:-
abc1.ctl
abc2.ctl
abc3.ctl
abc4.ctl
Thank you
Kais
Hi
I have a Unix directory which contains directories one or two or all (java6, java7 and java8).
I would like to know which is the latest java directory.
I can write a Unix script but I would like to know if there is a simplest way to do it in a Unix script.
If the directory contains Java6...
Hi
I have a function to draw a box in UNIX shell but I would like to draw a baox with a solid line.
What is the ANSI escape sequence to draw a solid lines.
My scripts is
function draw_box
{
tput clear
echo "\033[4;2H +---------------------------------------------------------------...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.