help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding Interpreter Spoofing


From: iam_chunky_pie
Subject: Re: Understanding Interpreter Spoofing
Date: Sat, 04 Dec 2021 18:21:01 +0000


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Saturday, December 4th, 2021 at 11:05 AM, Lawrence Velázquez <vq@larryv.me> 
wrote:

> On Sat, Dec 4, 2021, at 12:59 PM, iam_chunky_pie wrote:
>
> > On Saturday, December 4th, 2021 at 7:31 AM, Kerin Millar
> >
> > kfm@plushkava.net wrote:
> >
> > > On Sat, 04 Dec 2021 04:24:17 +0000
> > >
> > > iam_chunky_pie via help-bash@gnu.org wrote:
> > >
> > > > mv script ~/-i
> > > >
> > > > oldPATH=$PATH
> > > >
> > > > PATH=.
> > > >
> > > > -i
> > >
> > > In this instance, ./-i as conveyed as an argument to the interpreter 
> > > (/bin/bash). Therefore, it won't be treated as an option.
> >
> > Thanks. I thought as such but I can't get any of the commands to
> >
> > accept -i as a file argument. I've tried:
> >
> >     mv script '-i'
> >     mv script "-i"
> >
> >     cd newdir
> >     ln ../script -i --force
> >
> >
> > None work. The latter creates the hard link with the same name -
> >
> > "script", not -i. I can't figure out whats missing.
>
> https://mywiki.wooledge.org/BashPitfalls#Filenames_with_leading_dashes
>
> -------------------------------------------------------------------------
>
> vq

Thank you gentlemen!  I was now able to use -i as an argument.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]