bash script path variables

Sorry if this is the wrong forum (did a search for other bash related
questions and went to where they seemed to be at).

I've got a script I've written to do some various backup tasks - I got
it scheduled and everything like that but I'm having an issue.

There's a folders structure /Scholastic/EESAM_Sever/.... that exists
and I can browse it without any issue.
I issue the command "$Path=/ScholasticEE" and I get back "-bash:
=/ScholasticEE/: No such file or directory"
So I checked my typing and everything looks good.. I can even use auto
complete "$Path=/Scho<tab>" which then gives me "$Path=/ScholasticEE/"
and I still get the same error.

Even in FTP I have an issue.
ftp -pin
ftp> lcd
Local directory now /root
ftp> lcd /ScholasticEE
Local directory now /ScholasticEE
ftp> lcd
Local directory now /root

Even if I try an mput command
mput /ScholasticEE/SAM_Server/SAM_BKUP_201202*.*
550 /ScholasticEE/SAM_Server/ The system
cannot find the path specified.

Obviously it can find the file because it was able to process the wild
cards to an actual file but then it cannot read them?
If I do an ls -l rights are reported back as "-rw-rw-r--"

Any thoughts?


2/22/2012 5:06:02 PM
novell.netware.6x.admin-tools 11680 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 9

Hash: SHA1

I'd probably post in the OES Linux (vs. OES NetWare) forum in the future.

The first error is an understanding problem with bash.  To set a
variable you do NOT use the variable on the left-hand side:


Later, show it with the path to indicate it is a variable:

echo $Path

Where you are using the $Path to set things what you're telling bash to
do is to find $Path and print it out and whatever it prints out treat as
something to have the path set to it.  Anyway, it's wrong in almost all

Later you're breaking the FTP client's rules which as far as I know has
nothing to do with your earlier environment variable attempt.  This is a
confusing issue that everybody using the ftp command eventually hits so
it's a great question to ask.  Normally ftp's put command is given a
file to send somewhere (to the FTP server) and it takes the given-file
(the whole thing) and tells the FTP server to put it with the same name.
 Thus, the following:

ftp> put somefile.txt

is actually doing the following:

ftp> put somefile.txt somefile.txt

The first parameter is what to send, the second parameter is how to
place it on the destination side.  You can do this explicitly to rename
files while sending them:

ftp> put somefile.txt someOtherName.txt

Now, what if you have a path?  You did not indicate you had tried it but
taking out wildcards should result in the same failure:

ftp> put /tmp/somefile.txt

This should likely fail on your box because it's actually sending this:

ftp> put /tmp/somefile.txt /tmp/somefile.txt

So does your FTP server really have a /tmp directory?  Probably not.
Does it have /ScholasticEE?  Almost certainly not.  Anyway, the
following test will show you how it CAN work (in all cases, assuming the
origin file exists and permissions allow you to access it, of course):

ftp> put /tmp/somefile.txt somefile.txt

So that will send assuming /tmp/somefile.txt is accessible.  Similarly
the following should work:

ftp> put /ScholasticEE/SAM_Server/

In your case the wildcard finds what you want to send, but the path goes
across too and doesn't send properly.

Good luck.
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla -

2/22/2012 5:41:13 PM

Similar Artilces:

problem using bash variables with command-line perl in bash script
Hi! I have a problem with variables when using command-line perl in a bash script. The script should update a date (in 2003-10-10 form) if the argument, which is a file name, exists on the same line in the file updated_files.txt. #!/bin/bash FILENAME=$1 UPDATED=`date +%F` echo echo "perl -wne 'if (/$FILENAME/) { s/\d{4}-\d{2}-\d{2}/$UPDATED/;print; } ' updated_files.txt" #Exactly as below, to see how the command looks like perl -wne 'if (/$FILENAME/) { s/\d{4}-\d{2}-\d{2}/$UPDATED/;print; } ' updated_files.txt exit [marcus@neo Scripts]$ my_...

Bash Script on NetWare Platform
Hello, I am on the point of writing a simple shell script that should run on my Netware 6.5 Box. The purpose is simple: creating a zipfile of all the files from last day. inside bash, I tested with the following command: find -daystart -mmin 27300 -type f | zip -@ -m - o /mnt/vol1/Data/tmp/ to pack all the files that are from 31.3.2006 or older. (the mmin of course is only valid for today, I'm just at the point of cleaning up the things). This simple line works great, when executed manually, while entering at the commandline (bash prompt). As soon...

Netware 6x Benchmarking Tools
Hello, I am currently evaluating a couple of servers, running Netware 6.5. Does anyone know of a good bencmarking tool I could use to test these servers (preferably free!) Many thanks Andy Stokoe Manchester Metropolitan University UK Netbench? -- Marcel Cox ...

$PATH/expect_scripts/script.exp | $PATH/perl/
the subject describes my wishes. what i really want to do is parse the screens of an expect script through a perl script... now, what i would like to do is understand how to catch a pipe in perl, and how my program will end up being different. I looked up pipe in 'perldoc -q pipe' and 'perldoc -f pipe' i'm having trouble parsing the information, so i'm looking forward to a little bit of extra enlightenment :) thanks, willy i feel silly. with regard to pipe catching:: while (<STDIN>) { print " $_, is a lovely stri...

logins script and netware admin console -
We were getting an 8080 error message for a drive mapping because our login script used "%Login_Name" and some of our users have more than 8 characters. I changed the "%Login_Name" to "%CN" and now the login script seems to be running fine - but we can't access Netware Admin or navigate through the directories on the network. 1st - I want to find out how to edit the login script without going through Netware Admin Console - where is the script saved? I want to see if this resolves the problems. Please help! Thanks, , > We were gettin...

Netware Admin Tools Not Accessible/Installed
I installed OES Linux with Netware and then used the migration tool to migrate a Netware 4.11 server to the new server. Everything has migrated fine (all the users are there, the NDS tree is intact) but the administration tools on the OES server are not functioning. For example, 1) "http://localhost" does not pull up a page, 2) ConsoleOne runs but the option under tools to pull up the "remote console" for this Netware server is not evern there. The bottom line is at this point after reading through the documentation I can find no way to gain access to the Netware ...

Tools, Tools, Tools
</quot> Couple useful things for IT admins out there. I've packaged up Werner and Feder's PoC scanner via py2exe here. You can now simply run: </end_quot> -- "Never drive faster than your ANGEL can fly" ...

Netware scripting issue
I'm having trouble getting started with scripting on netware. (nw6.5sp4) I need to be able to use cron to schedule 3 rsync processes but I don't know how long they will take and I don't want them running together. Basically I want any method at all of being able to start rsync then start another when the first has finished. I thought it would be simple to use perl but find that the syntax that works to "execute a command and wait" on perl for linux or windows does not not work for me on netware: $result = `ext_command` #uses backticks with this method...

System Login script: different for SYSCON & NetWare Admin
Hi All, I have a discrepancy between the system login script I see from SYSCON versus the one I see for NetWare Admin. Oddly enough the changes made in NWAdmin seem to take, but not be reflected in SYSCON. Finally I put specific comment in the scrip so I could search for the script file on my SYS: disk. The file does not exist in text form. So first off:- - Novel Netware 4.11 - SYSCON 3.75 - NetWare Admin Vers 5.1.9f Odd error running SECURITY.EXE that I wondered if it might relate: Server Error (0x89ec) reading Supervisor OBJ_SUPERVISOR property from bindery. s...

Data scripting tool ( NOT DATABASE scripting)
Hi to all Is there any option in sql server DTS or any other third party tool that can script data. By scripting data i mean that.... if a table "Employee" contains 50 rows, i want the tool to write 50 insert queries for me so that i can run in it anywhere. Problem is i have to insert data in a remote server where i cannot use DTS. I just have a text area to write my query and press the run button.. Hope u understand my problem. In case of any explanation please reply. Waiting for your response. Thanx in advance. by to all Syed Aziz ur Rahman

Passing variables between Server scripts and client scripts!
Hi, I am having difficulty in passing a variable from a server script to a client script. I am looking to take a parameter that is passed into an ASP page from another page and use this parameter in a client side script.Is it possible to do this?? A simplified version of what I want to do is: <% Dim Tag Tag = Request.QueryString("ID") %> ........... <%Script Language="VBScript"> Dim Tag2 Tag2 = <%=Tag%> document.write(Tag2) <Script> Any help greatly appreciated!! 1. need quotes around the literal value in cli...

Bash on NW6.5SP3 = How run bash script ??
In the NW6.5SP3 i found BASH ! : ) Greate .. Read how have access to the NW Volumes (with file sys:\etc\pathtab). This work . For testing write simple BASH-script: 1. Create file: sys:\mnt\test 2. Insert string to this file: echo "Hello world" 3. From bash do: chmod +x /mnt/test And run from bash: /mnt/test But have error: SYS:\BIN\BASH: /mnt/test: cannot execute binary file Why this ?? Serg Serg wrote: > In the NW6.5SP3 i found BASH ! : ) Greate .. > > Read how have access to the NW Volumes (with file sys:\etc\pathtab). This > w...

Netware Admin and SLES 9 admin rights
Hi, How can I check or assign admin rights to Netware admin account on SLES 9 OS. I am running OES Linux and when creating NSS volumes through iManager (logged in as the Netware administrator) I receive the error message 'CIO error, permission denied". Thank you. Zavi, > Hi, > > How can I check or assign admin rights to Netware admin account on SLES 9 > OS. Just as you normally do within NetWare using C1 or iManager, check that your admin is a trustee of root with all rights assigned. > I am running OES Linux and when creating NSS volumes thro...

Hi guys! How do I export a bash variable into bash environment?
Very simple i would think, like "system('export CVSROOT=/path/to/repository')" Or so i would I guess; what i just wrote does not work for me. I'm needing this for a CVS repository selection script. Does this make sense? All of the repositories are on a single server. Here's my logic. # Open the CVS root directory (Where all the repositories will be stored under) and show a menu to the user of all repositories available. # Give user a choice of each directory (repository) to select as their own CVSROOT # Export that path to bash environmental variabl...

Web resources about - bash script path variables - novell.netware.6x.admin-tools

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

YouTube v10.32 Tweaks Some Interface Elements And Includes Hints About Virtual Reality Content And Variable ...
Forget Update Wednesday! Monday is the new big day. Not only were we treated to the latest M preview release and the official Marshmallow name, ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Staley: 'A lot of different variables...been a hard year'
... 41° Navigation Home Giants A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Staley: 'A lot of different variables...been ...

Expert Reveals the Latest Variable Capacity Technology
Learn about gForce Ultra CRAC equipment, the latest variable capacity technology to lower energy usage and increase reliability.

Resources last updated: 1/11/2016 5:13:26 PM