Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


fritfald
2019-01-18T08:52:22Z
this is from explorer:
Last login: Fri Jan 18 09:46:51 2019 from 172.23.10.10
-bash: nawk: command not found
-bash: nawk: command not found
who: invalid option -- 'M'
Try 'who --help' for more information.
Kan ikke finde Ingres installation ob
ratata.foa.dk> pwd
/progs/fiks/drift/JOBS
ratata.foa.dk>

This is from a task using this connection with the same command PWD:
/home/fksb00

Why do we not end up in the same directory?
Sponsor
Forum information
Support
2019-01-18T10:12:30Z
Sending a command is a specific method in SSH execution. It is very different from running as text. For example, output and error handling is different.

I am not sure which "explorer" you are comparing with - the Connection explorer (terminal session)

But maybe more important is what the problem you see with this?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fritfald
2019-01-18T10:24:09Z
Im in the Connections on the frontpage of Visualcron 8.4.
There I choose Explorer. and then I choose Connections again.
And here the environment for the user fksb00 is okay, and a command pwd gets me /progs/fiks/drift/JOBS

But if I make a task, and choose to Send Command with the same connection in SSH, then I get pwd at the directory /home/fksb00 , and the environment for fksb00 is not read, so my alias and settings is not working.
Support
2019-01-18T15:36:41Z
Try alternative "Send text" instead of "Send command" in the Task.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fritfald
2019-01-21T07:32:23Z
gives the same error.
I can see that Visualcron behaves differently when I use the whole library path as an input for my script, instead of just the command-name itself.
Can you confirm that I have to specify the whole library path for every shell-script?
The box underneath the "Text to send" box, called "Environment variables", what is the purpose of that? Is it because Visualcron cant set the correct environment for the user and where can I find examples of what to put into that box?

It looks like the alias for the shell-script isn't working in the SSH commandline, and that the environment is not read correctly into the SSH command line?
Support
2019-01-21T12:38:21Z
Please try setting it throught the Environment box in the command/text form.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fritfald
2019-01-21T12:45:42Z
okay, what are the rules for syntax, where do I find the guidelines for setting path, upper og lowercase, with or without ' ?
fritfald
2019-01-22T13:25:50Z
looks like the env for the user was wrong.
Case solved.
Support
2019-01-23T07:52:06Z
Thanks for the feedback - if you have any more details about this please post it here.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fritfald
2019-01-24T09:00:04Z
it works with Send text and it returns the exit $antal , a number , as Exit Code, and that number I can use in the Flow as an Event Type with Condition and Flow type.
fritfald
2019-01-31T08:13:59Z
If I want the SSH, Send Text to change from BASH to KSH-shell, how do I do that? I have som ksh scripts that are running in KSH, and some of the options/arguments in KSH wont work when my send command is in BASH mode, example here:

. /progs/fks/b/batch/jobs/aka00192.sh aka/b/fiksbdb

Last login: Wed Jan 30 15:31:33 2019 from 172.23.10.10

ratata.foa.dk> is$ . /progs/fks/b/batch/jobs/aka00192.sh aka/b/fiksbdb
-bash: set: -A: invalid option
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
basename: invalid option -- 'b'
Try 'basename --help' for more information.

in script, this is the -A and b options the bash cant run, since it a KSH script:

# Delsystemer
# Alle delsystemnavne findes i f▒lgende versioner - de skelnes
# paa det sidste ciffer i delsystemnavnet:
# p - driftimages.
# d - uddannelsesimages.
# b - brugertestimages.
# u - udviklingsimages.
# r - revisionsimages.
# s - standardtestimages (integreret test).
# c - konverteringstest.
# 9 - beskyttede versioner
set -A delsysbatch bifrostp akaudp fimbulp \
bifrostd akaudd fimbuld \
bifrostb akaudb fimbulb \
bifrosts akauds fimbuls \
bifrostc akaudc fimbulc \
bifrostr akaudr fimbulr \
bifrost9 akaud9 fimbul9 \
bifrostu akaudu fimbulu

# Produktionsversioner = p

export bifrostp="${bimagedir}v01_bifrost_p"
export akaudp="${bimagedir}v01_akaud_p"
export fimbulp="${bimagedir}fimbul_p"

# Brugertestversioner = b
export bifrostb="${bimagedir}v01_bifrost_b"
export akaudb="${bimagedir}v01_akaud_b"
export fimbulb="${bimagedir}fimbul_b"



Scroll to Top