On 12/20/2015 10:30 AM, Jon LaBadie wrote:
On Sun, Dec 20, 2015 at 01:42:30PM +0100, Joachim Backes wrote:
Hi all,
Running F23, and my shell is /bin/bash.
My problem: suppose you define an alias:
alias x='echo PAR=$1'
Now call the alias by:
x 1
Output: PAR= 1
My question: why do I get the
On Sun, Dec 20, 2015 at 01:42:30PM +0100, Joachim Backes wrote:
> Hi all,
>
> Running F23, and my shell is /bin/bash.
>
> My problem: suppose you define an alias:
>
> alias x='echo PAR=$1'
>
> Now call the alias by:
>
> x 1
>
> Output: PAR= 1
>
> My question: why do I get the blank before th
Hello,
Patrick O'Callaghan writes:
> On Sun, 2015-12-20 at 15:00 +0100, Joachim Backes wrote:
>> Remark: Working with aliases seems to be a bit sophisticated :-)
>
> Not really. IIRC aliases predate functions. They were first introduced
> in the C Shell (see https://en.wikipedia.org/wiki/Alias_(
On Sun, 2015-12-20 at 15:00 +0100, Joachim Backes wrote:
> Remark: Working with aliases seems to be a bit sophisticated :-)
Not really. IIRC aliases predate functions. They were first introduced
in the C Shell (see https://en.wikipedia.org/wiki/Alias_(command)) and
are thus more limited.
poc
--
On 20.12.2015 13:42, Joachim Backes wrote:
Hi all,
Running F23, and my shell is /bin/bash.
My problem: suppose you define an alias:
alias x='echo PAR=$1'
Now call the alias by:
x 1
Output: PAR= 1
My question: why do I get the blank before the "1"?
All comments are welcome.
Kind regards
Hello,
Michael Welle writes:
> Hello,
>
> Philip Brown writes:
>
>> same problem... not on my terminal
>>
>> bash-4.3$ x 1
>> PAR=1
>>
>> but I must say you explained "the why" very well regards the initial
>> empty parameter
> by problem I mean the expectation that $1 has any meaning in this
>
Hello,
Philip Brown writes:
> same problem... not on my terminal
>
> bash-4.3$ x 1
> PAR=1
>
> but I must say you explained "the why" very well regards the initial
> empty parameter
by problem I mean the expectation that $1 has any meaning in this
context. It looks like it will work, but it will
same problem... not on my terminal
bash-4.3$ x 1
PAR=1
but I must say you explained "the why" very well regards the initial empty
parameter
On Sun, Dec 20, 2015 at 2:20 PM, Michael Welle wrote:
> Hello,
>
> Philip Brown writes:
>
> > i think that is a feature of echo
> > if you want without
Hello,
Philip Brown writes:
> i think that is a feature of echo
> if you want without the space you could use printf
>
> alias x='printf "PAR=%s\n" $1'
same problem as with the initial question. What value does the $1 have?
It is empty. alias does not expect any parameters, if that might be the
i think that is a feature of echo
if you want without the space you could use printf
alias x='printf "PAR=%s\n" $1'
On Sun, Dec 20, 2015 at 1:42 PM, Joachim Backes <
joachim.bac...@rhrk.uni-kl.de> wrote:
> Hi all,
>
> Running F23, and my shell is /bin/bash.
>
> My problem: suppose you define an
Hello,
Joachim Backes writes:
> Hi all,
>
> Running F23, and my shell is /bin/bash.
>
> My problem: suppose you define an alias:
>
> alias x='echo PAR=$1'
>
> Now call the alias by:
>
> x 1
>
> Output: PAR= 1
>
> My question: why do I get the blank before the "1"?
because you wrote it when formu
On Sun, Dec 20, 2015 at 7:57 AM, Fulko Hew wrote:
> On Sun, Dec 20, 2015 at 7:42 AM, Joachim Backes
> wrote:
>> Hi all,
>>
>> Running F23, and my shell is /bin/bash.
>>
>> My problem: suppose you define an alias:
>>
>> alias x='echo PAR=$1'
>>
>> Now call the alias by:
>>
>> x 1
>>
>> Output: PAR
On Sun, Dec 20, 2015 at 7:42 AM, Joachim Backes
wrote:
> Hi all,
>
> Running F23, and my shell is /bin/bash.
>
> My problem: suppose you define an alias:
>
> alias x='echo PAR=$1'
>
> Now call the alias by:
>
> x 1
>
> Output: PAR= 1
>
> My question: why do I get the blank before the "1"?
>
> All
Hi all,
Running F23, and my shell is /bin/bash.
My problem: suppose you define an alias:
alias x='echo PAR=$1'
Now call the alias by:
x 1
Output: PAR= 1
My question: why do I get the blank before the "1"?
All comments are welcome.
Kind regards
Joachim Backes
--
Fedora release 23 (Twenty
14 matches
Mail list logo