Ha ya I thought the same thing. The first one is ignored and the second one remains. The space is not escaped and is intepreted at a type of seperator for the next variable. I'm trying different things right now. I think there is something to do with the actual PATH vs path vd ${PATH} im not sure just trying things
Ya I am almost positive its suppose to be set like this. But! I actually found the problem...well at least theoretically.
You were right the \ does work to espace the character it just that something is going wrong somewhere else in my script where it sources something which sets something idk i'll have to look into this.
Thanks
---------- Post updated at 03:37 PM ---------- Previous update was at 03:17 PM ----------
OKay so I figured out the problem but I do not have a solution.
Basically when you do this
it works completely fine, no problems.
BUT! the next time you add a path it will interpret blank spaces as a new variable start.
so if i do
then the previous path formatting gets messed up!
Hello all,
I am EXTREMELY new to using bash and I have a bit of a problem: I'm trying to set up a shell script that can
1.) take one of several giant files off of an external hard drive
2.) use it as input for scripts on my laptop's hard drive
... (3 Replies)
Hi All,
I did a review of some threads to see if someone had come across this problem.
My system is an oracle virtual box solaris 10 installed on a windows 10 system.
Right now I am learning scripting and am just playing with the env variables.
I am trying to update the PATH to... (9 Replies)
I have a script like this running under OS X 10.8. The problem arises when the find command encounters a space in the path name. I need the "dir" variable as I'll be extending the script to more general use.
#!/bin/bash
CFS=$IFS
IFS=$(echo)
set dir = "/Users/apta/Library/Mail\... (3 Replies)
I do know how we set the PATH variable-
export PATH=$JAVA_HOME/bin:$PATH
I'm trying to understand why we have written :$PATH in the end above statement. What is it's meaning? (2 Replies)
Hi,
I have a large flat file from host without delimiter. I'm transforming this file to a csv file using statements like
# Row 03: Customer / field position 3059 +20
WOFABNAM=substr( $0, 3059, 20 );
and deleting the trailing whitespaces before and after with that
sub( /^ +/, "",... (4 Replies)
Hi,
Could anyone help me in writing a single line code by either using (sed, awk, perl or whatever) to extract a specific path from the PATH environment variable?
for eg: suppose the PATH is being set as follows
PATH=/usr/bin/:/usr/local/bin:/bin:/usr/sbin:/usr/bin/java:/usr/bin/perl3.4
... (2 Replies)
Hi,
I am new to shell scripting.I tried adding an entry to the path variable like below
export PATH=$PATH:/opt/xxx/bin
But am getting an error invalid identifier /opt/xxx/bin
Can someone tell me the error above and correct me .
Thanks and Regards,
Padmini (2 Replies)
Hi all,
I have a java command in a shell script.
When i m executing the command from the prompt its working fine. But when i paste the same command in a shell script and execute the shell script it says path not found. Please help. (5 Replies)
Hi there,
I need help on setting the path variable. How can I set the path variable with Bourne Shell. My scripts goes like this, but did not work.
#!/bin/sh
PATH=/usr/bin:/usr/ucb:/etc:/export/home/zchen/home
export PATH
Thanks,
Z (4 Replies)