Re: [ubuntu-uk] Bash and Path checks

2009-04-20 Thread Tony Travis
Cornelius Mostert wrote: > Thanx but I am familiar with / in Linux and \ in windows... i saw a > script use \ as i did and naturally I assumes (incorrectly though) > that it is also | (pipe) but backward pipe like <, come to think of it > the path the person wanted to append to the variable a path

[ubuntu-uk] Bash and Path checks

2009-04-20 Thread Cornelius Mostert
Thanx but I am familiar with / in Linux and \ in windows... i saw a script use \ as i did and naturally I assumes (incorrectly though) that it is also | (pipe) but backward pipe like <, come to think of it the path the person wanted to append to the variable a path that contained a space in it so t

Re: [ubuntu-uk] Bash and Path checks

2009-04-20 Thread Tony Arnold
Cornelius, Cornelius Mostert wrote: >> Are you doing this to avoid the mkdir if the directory you are creating >> already exists? If so, then the is an option -p which means it is not an >> error if the directory already exists. It also creates parent >> directories as needed, so: >> >> mkdi

Re: [ubuntu-uk] Bash and Path checks

2009-04-20 Thread Stephen O'Neill
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/04/09 09:27, Sean Miller wrote: > pipe is | not \ > > \ is the way you make a character literal. In other words you remove > it from the parsing and have it interpreted as the character it is. > > Like "I'm going slightly \"mad\""... ;-) And

Re: [ubuntu-uk] Bash and Path checks

2009-04-20 Thread Sean Miller
pipe is | not \ \ is the way you make a character literal. In other words you remove it from the parsing and have it interpreted as the character it is. Like "I'm going slightly \"mad\""... ;-) Best, Sean -- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https

[ubuntu-uk] Bash and Path checks

2009-04-20 Thread Cornelius Mostert
>Are you doing this to avoid the mkdir if the directory you are creating >already exists? If so, then the is an option -p which means it is not an >error if the directory already exists. It also creates parent >directories as needed, so: > > mkdir -p $newPath/Sound/MP3 > mkdir -o $newpa

Re: [ubuntu-uk] Bash and Path checks

2009-04-17 Thread Tony Arnold
Cornelius, Cornelius Mostert wrote: > Hallo > > I wrote my first Bash script! > However I am struggling to find a way to test if 2 paths are the same: > 1. I use a for loop to run through a set of folders in a path (lets > say /home/myFiles/) > 2. Now Test if the File Extension is = "mpg" > 2.1.

Re: [ubuntu-uk] Bash and Path checks

2009-04-17 Thread Neil Greenwood
2009/4/17 Cornelius Mostert : > Hallo > > I wrote my first Bash script! > However I am struggling to find a way to test if 2 paths are the same: > 1. I use a for loop to run through a set of folders in a path (lets > say /home/myFiles/) > 2. Now Test if the File Extension is = "mpg" > 2.1. If true

[ubuntu-uk] Bash and Path checks

2009-04-17 Thread Cornelius Mostert
Hallo I wrote my first Bash script! However I am struggling to find a way to test if 2 paths are the same: 1. I use a for loop to run through a set of folders in a path (lets say /home/myFiles/) 2. Now Test if the File Extension is = "mpg" 2.1. If true then I would like to know if the path of the