> On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote:
> > The script:
> > #/bin/bash
^ missing ! here
typo in the shebang?
> > # testlink.sh
> > # must be run as root
> >
> > file1="$1"
> > shift
> > mandir=/usr/local/share/man/man3/
> > cp "$file1" "$mandir"
> > cd "$mandir"
>
On Fri, Feb 19, 2016 at 12:45 AM, Greg Wooledge wrote:
> On Thu, Feb 18, 2016 at 05:58:28PM +0100, baldu...@units.it wrote:
> > > On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote:
> > > > The script:
> > > > #/bin/bash
> > ^ missing ! here
> >
> > typo in the shebang?
>
> Yes, n
On Thu, Feb 18, 2016 at 05:58:28PM +0100, baldu...@units.it wrote:
> > On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote:
> > > The script:
> > > #/bin/bash
> ^ missing ! here
>
> typo in the shebang?
Yes, nicely done. I missed that.
On Fri, Feb 19, 2016 at 12:22:20AM +0700, R
On Thu, Feb 18, 2016 at 11:30 PM, Greg Wooledge wrote:
> On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote:
> > The script:
> > #/bin/bash
> > # testlink.sh
> > # must be run as root
> >
> > file1="$1"
> > shift
> > mandir=/usr/local/share/man/man3/
> > cp "$file1" "$mandir"
> > cd "$
On Thu, Feb 18, 2016 at 11:06:37PM +0700, Robert Parker wrote:
> The script:
> #/bin/bash
> # testlink.sh
> # must be run as root
>
> file1="$1"
> shift
> mandir=/usr/local/share/man/man3/
> cp "$file1" "$mandir"
> cd "$mandir"
You MUST check the result of cd. If it fails but you continue on,
yo
The script:
#/bin/bash
# testlink.sh
# must be run as root
file1="$1"
shift
mandir=/usr/local/share/man/man3/
cp "$file1" "$mandir"
cd "$mandir"
echo '$hash = '"$#"
while (( "$#" )); do
file2="$1"
ln "$file1" "$file2"
shift
done
Results:
>> sudo ./testlink.sh readfile.3 readtextfile.3