Why does 'cp -f' not work anymore?
Cameron Simpson
cs at zip.com.au
Mon Nov 14 23:21:43 UTC 2005
On 14Nov2005 14:50, Michael Velez <mikev777 at hotmail.com> wrote:
| > > Try this, addressing both problems:
| > >
| > > cp()
| > > {
| > > __cp_iopt=-i
| > > for __cp_arg
| > > do case "$__cp_arg" in
| > > --) break ;;
| > > -f* | -[a-z]*f* | --force )
| > > __cp_iopt=; break ;;
| > > -*) ;;
| > > *) break ;;
| > > done
| > > set -- $__cp_iopt ${1+"$@"}
| > > command cp "$@"
| > > }
| >
| > I'm just getting around to doing this but I'm getting a syntax error.
| >
| > -bash: /etc/bashrc: line 17: syntax error near unexpected token
| > `newline'
| > -bash: /etc/bashrc: line 17: ` done'
| >
| > I'm copying/pasting exactly as it's found in the email.
|
| There needs to be the keyword "esac" (inverse of the word "case"), to close
| the case statement, on a line before the keyword "done".
|
| I believe that should do it.
Yes. Sorry about that.
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Strong typing isn't for weak minds; the argument 'strong typing is for weak
minds' is for weak minds. - Guy Harris
More information about the redhat-list
mailing list