[SOLVED] Re: variables in bash

2024-03-28 Thread Hans
Hi, thank you all for the fast response. It helped a lot and made everything clear. The problem is solved. Have a nice eastern. Best Hans

Re: variables in bash

2024-03-28 Thread Paul M Foster
On Thu, Mar 28, 2024 at 10:37:25AM +0100, Hans wrote: > Hi folks, > > just an easy question: > > What is the difference (if any) between the following two variables in a > shellfile in bash: > > 1. mypath=/home/user1/Tools/ Here you are assigning a value to the variable "mypath". You can surr

Re: variables in bash

2024-03-28 Thread Greg Wooledge
On Thu, Mar 28, 2024 at 10:37:25AM +0100, Hans wrote: > What is the difference (if any) between the following two variables in a > shellfile in bash: > > 1. mypath=/home/user1/Tools/ > 2. mypath="/home/user1/Tools/" They are the same. The quotes are optional here, because your assignment doesn'

variables in bash

2024-03-28 Thread Hans
Hi folks, just an easy question: What is the difference (if any) between the following two variables in a shellfile in bash: 1. mypath=/home/user1/Tools/ and $mypath or 2. mypath="/home/user1/Tools/" and $mypath Is this in bash the same? Do other shells (sh, zsh, whatever) handle these two

Re: problem with \n and variables in bash script

2002-10-16 Thread Iñaki Martínez
Hi!!! Thank you both... Colin, Quote correctly. Also, you can probably drop the -e. echo "$SALIDA" really i feel no words.. :-( > > So my question is how to get \n processed with variables. > > You need to set the IFS variable. Read 'man bash'. Just put > > IFS='

Re: problem with \n and variables in bash script

2002-10-15 Thread Claudio Bley
On Tue, 2002-10-15 at 17:27, Iñaki Martínez wrote: > > HI > > > I have this bash script: > > #!/bin/bash > > > > SALIDA=$(diff file1 file2) > > if [ $? == 1 ] > then >echo -e $SALIDA | mail -s variable

Re: problem with \n and variables in bash script

2002-10-15 Thread Colin Watson
On Tue, Oct 15, 2002 at 05:27:28PM +0200, I?aki Mart?nez wrote: > SALIDA=$(diff file1 file2) > > if [ $? == 1 ] > then >echo -e $SALIDA | mail -s variable my_email >diff file1 file2 | mail -s directly my_email > fi > > -

problem with \n and variables in bash script

2002-10-15 Thread Iñaki Martínez
HI I have this bash script: #!/bin/bash SALIDA=$(diff file1 file2) if [ $? == 1 ] then echo -e $SALIDA | mail -s variable my_email diff file1 file2 | mail -s directly my_email fi