Hi Per Olov,
what's the output if you run say errortext(28) on your system?
Where from did you obtain this Mac OS build of ooRexx 5.0? Or did you build it on your own?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Per Olov,
I don't see how this "corrupt file" message is related to ooRexx
Both examples that you providde, show that you're issuing an (invalid) command to your ksh shell, when this messages appears.
In your first example, Rexx evaluates WHILE 'B' > 'A' THEN to 1 and sends this to ksh as invalid command 1
In the second example, rexxtry evaluates version to REXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017, and then again issues this to ksh as an invalid command
Please check what happens if you directly issue e. g. 1 from within your ksh.
If you still believe this is Rexx-related, please provide Rexx sample code without ksh involvment.
---------- Forwarded message ----------
From: P.O. Jonsson linux@jonases.se
Date: Mon, Apr 17, 2017 at 8:44 PM
Subject: Fwd: [oorexx:bugs] #1439 Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: 1: not found
To: erich_st@users.sf.net
Hello Erich,
Sorry for passing the mail on, but I am on another machine doing these things.
I am on Mac OS X Sierra, 64 bit installation of ooRexx
POs-12Core-Pro:epab po$ rexx -v
Open Object Rexx Version 5.0.0
Build date: Jan 20 2017
Addressing mode: 64
I have installed ooRexx together with BSF4ooRexx and already had a similar problem earlier but with the help of Rony Flatscher I could move the catalogue file to (what we thought was the right place to silence the error message. Apparently It was not sufficient for all errors. I advice to talk to Rony to get the full picture, There is some weird issues with what Java version that is requested from BSF, but that may be totally unrelated, FYI only.
Here is the output of say errortext() apparently it works. But when I make a mistake the error comes back.Regarding the BSF version se below.
Hope this helps if not tell me what to do next.
POs-12Core-Pro:epabpo$rexxrexxtryREXX-ooRexx_5.0.0(MT)_64-bit6.0520Jan2017rexxtry.REXletsyouinteractivelytryREXXstatements.EachstringisexecutedwhenyouhitEnter.Enter'call tell'foradescriptionofthefeatures.Goon-tryafew...Enter'exit'toend.sayhelloHELLO..............................................rexxtry.REXonDARWINsayerrortext(28)InvalidLEAVEorITERATE...............................................rexxtry.REXonDARWINversionMessageCatalogSystem:corruptfile.MessageCatalogSystem:corruptfile.MessageCatalogSystem:corruptfile.ksh:syntaxerroratline1:`(' unexpected rc = 3 ....................................... rexxtry.REX on DARWIN-version Oooops ! ... try again. Invalid expression. Incorrect expression detected at "-". rc = 35.1 .................................... rexxtry.REX on DARWINPOs-12Core-Pro:~ po$ rexx -e "call bsf.cls;say .java.lang.System~getProperty('java.version')"1.6.0_65POs-12Core-Pro:~ po$ java -versionjava version "1.8.0_121"Java(TM) SE Runtime Environment (build 1.8.0_121-b13)Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)POs-12Core-Pro:~ po$ rexx -e "callbsf.cls;say.b4r~version"600.20170405
Hello Erich and thanks for your analysis. To my knowledge I have never used a korn shell, I use Bash (default on Mac OS X), which I confirmed by querying a terminal, see below. If ooRexx send the info (from an illegal command ending in the terminal session) to a korn shell or if it is interpreted by Bash as directed to ksh it is beyond my comprehension.
Let´s leave it here, I thought with a new version of 00Rexx I’ll send all feedback I can to the team. I am not harmed in any way except that I am fooled by the error message when I create an illegal ooRexx statement
Last login: Tue Apr 18 21:24:24 on console
POs-Mac-Pro:~ po$ set
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.nkv8tn4wkx/Render
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_REMATCH=([0]="o")
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="57" [3]="1" [4]="release" [5]="x86_64-apple-darwin16")
BASH_VERSION='3.2.57(1)-release'
CLASSPATH=:/Library/Frameworks/BSF4ooRexx.framework/Classes/bsf4ooRexx-v452-20150812-bin.jar
COLUMNS=80
DIRSTACK=()
EUID=501
GROUPS=()
HISTFILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.historynew
HISTFILESIZE=500
HISTSIZE=500
HOME=/Users/po
HOSTNAME=POs-Mac-Pro.Jonases
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=de_DE.UTF-8
LINES=24
LOGNAME=po
MACHTYPE=x86_64-apple-darwin16
MAILCHECK=60
NLSPATH=:/usr/local/bin/rexx.cat
OPTERR=1
OPTIND=1
OSTYPE=darwin16
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin
PIPESTATUS=([0]="0")
PPID=831
PROMPT_COMMAND=update_terminal_cwd
PS1='\h:\W \u\$ '
PS2='> '
PS4='+ '
PWD=/Users/po
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHELL_SESSION_DID_HISTORY_CHECK=1
SHELL_SESSION_DID_INIT=1
SHELL_SESSION_DIR=/Users/po/.bash_sessions
SHELL_SESSION_FILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.session
SHELL_SESSION_HISTFILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.history
SHELL_SESSION_HISTFILE_NEW=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.historynew
SHELL_SESSION_HISTFILE_SHARED=/Users/po/.bash_history
SHELL_SESSION_HISTORY=1
SHELL_SESSION_TIMESTAMP_FILE=/Users/po/.bash_sessions/expiration_check_timestamp
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.VPHP27HDD7/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=388.1
TERM_SESSION_ID=8E859BEE-9D1E-406C-B55B-8CABC8F2B532
TMPDIR=/var/folders/pb/n87qg_7x1sx4jfg4bswfssvh0000gn/T/
UID=501
USER=po
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0 =NLSPATH
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
shell_session_delete_expired ()
{
if ( [ ! -e "$SHELL_SESSION_TIMESTAMP_FILE" ] || [ -z "$(find "$SHELL_SESSION_TIMESTAMP_FILE" -mtime -1d)" ] ); then
local expiration_lock_file="$SHELL_SESSION_DIR/_expiration_lockfile";
if shlock -f "$expiration_lock_file" -p $$; then
echo -n 'Deleting expired sessions...';
local delete_count=$(find "$SHELL_SESSION_DIR" -type f -mtime +2w -print -delete | wc -l); [ "$delete_count" -gt 0 ] && echo $delete_count' completed.' || echo 'none found.';
( umask 077;
touch "$SHELL_SESSION_TIMESTAMP_FILE" );
rm "$expiration_lock_file";
fi;
fi
}
shell_session_history_allowed ()
{
if [ -n "$HISTFILE" ]; then
local allowed=0;
if shopt -q histappend || [ -n "$HISTTIMEFORMAT" ]; then
allowed=${SHELL_SESSION_HISTORY:-0};
else
allowed=${SHELL_SESSION_HISTORY:=1};
fi;
if [ $allowed -eq 1 ]; then
return 0;
fi;
fi;
return 1
}
shell_session_history_check ()
{
if [ ${SHELL_SESSION_DID_HISTORY_CHECK:-0} -eq 0 ]; then
SHELL_SESSION_DID_HISTORY_CHECK=1;
if shell_session_history_allowed; then
shell_session_history_enable;
fi;
if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
unset PROMPT_COMMAND;
else
if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
PROMPT_COMMAND="${BASH_REMATCH[1]}${BASH_REMATCH[3]}";
fi;
fi;
fi
}
shell_session_history_enable ()
{
( umask 077;
touch "$SHELL_SESSION_HISTFILE_NEW" );
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
SHELL_SESSION_HISTORY=1
}
shell_session_save ()
{
if [ -n "$SHELL_SESSION_FILE" ]; then
echo -n 'Saving session...';
( umask 077;
echo 'echo Restored session: "$(date -r '$(date +%s)')"' >|"$SHELL_SESSION_FILE" );
declare -F shell_session_save_user_state > /dev/null && shell_session_save_user_state;
shell_session_history_allowed && shell_session_save_history;
echo 'completed.';
fi
}
shell_session_save_history ()
{
shell_session_history_enable;
history -a;
if [ -f "$SHELL_SESSION_HISTFILE_SHARED" ] && [ ! -s "$SHELL_SESSION_HISTFILE" ]; then
echo -ne '\n...copying shared history...';
( umask 077;
cp "$SHELL_SESSION_HISTFILE_SHARED" "$SHELL_SESSION_HISTFILE" );
fi;
echo -ne '\n...saving history...';
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE_SHARED" );
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE" );
: >|"$SHELL_SESSION_HISTFILE_NEW";
if [ -n "$HISTFILESIZE" ]; then
echo -n 'truncating history files...';
HISTFILE="$SHELL_SESSION_HISTFILE_SHARED";
HISTFILESIZE="$HISTFILESIZE";
HISTFILE="$SHELL_SESSION_HISTFILE";
HISTFILESIZE="$size";
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
fi;
echo -ne '\n...'
}
shell_session_update ()
{
shell_session_save && shell_session_delete_expired
}
update_terminal_cwd ()
{
local url_path='';
{
local i ch hexch LC_CTYPE=C LC_ALL=;
for ((i = 0; i < ${#PWD}; ++i))
do
ch="${PWD:i:1}";
if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
url_path+="$ch";
else
printf -v hexch "%02X" "'$ch";
url_path+="%${hexch: -2:2}";
fi;
done
};
printf '\e]7;%s\a' "file://$HOSTNAME$url_path"
}
Hi Per Olov,
I don't see how this "corrupt file" message is related to ooRexx
Both examples that you providde, show that you're issuing an (invalid) command to your ksh shell, when this messages appears.
In your first example, Rexx evaluates WHILE 'B' > 'A' THEN to 1 and sends this to ksh as invalid command 1
In the second example, rexxtry evaluates version to REXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017, and then again issues this to ksh as an invalid command
Please check what happens if you directly issue e. g. 1 from within your ksh.
If you still believe this is Rexx-related, please provide Rexx sample code without ksh involvment.
---------- Forwarded message ----------
From: P.O. Jonsson linux@jonases.se linux@jonases.se
Date: Mon, Apr 17, 2017 at 8:44 PM
Subject: Fwd: [oorexx:bugs] #1439 Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: 1: not found
To: erich_st@users.sf.net
Hello Erich,
Sorry for passing the mail on, but I am on another machine doing these things.
I am on Mac OS X Sierra, 64 bit installation of ooRexx
POs-12Core-Pro:epab po$ rexx -v
Open Object Rexx Version 5.0.0
Build date: Jan 20 2017
Addressing mode: 64
I have installed ooRexx together with BSF4ooRexx and already had a similar problem earlier but with the help of Rony Flatscher I could move the catalogue file to (what we thought was the right place to silence the error message. Apparently It was not sufficient for all errors. I advice to talk to Rony to get the full picture, There is some weird issues with what Java version that is requested from BSF, but that may be totally unrelated, FYI only.
Here is the output of say errortext() apparently it works. But when I make a mistake the error comes back.Regarding the BSF version se below.
Hope this helps if not tell me what to do next.
POs-12Core-Pro:epab po$ rexx rexxtry
REXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017
rexxtry.REX lets you interactively try REXX statements.
Each string is executed when you hit Enter.
Enter 'call tell' for a description of the features.
Go on - try a few... Enter 'exit' to end.
say hello
HELLO
.............................................. rexxtry.REX on DARWIN
say errortext(28)
Invalid LEAVE or ITERATE.
.............................................. rexxtry.REX on DARWIN
version
Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: syntax error at line 1: `(' unexpected
rc = 3 ....................................... rexxtry.REX on DARWIN
-version
Oooops ! ... try again. Invalid expression.
Incorrect expression detected at "-".
rc = 35.1 .................................... rexxtry.REX on DARWIN
Status: open
Group: 5.0.0
Created: Sun Apr 16, 2017 09:26 PM UTC by Per Olov Jonsson
Last Updated: Mon Apr 17, 2017 06:05 PM UTC
Owner: nobody
Attachments:
Hi Per Olov,
I don't see how this "corrupt file" message is related to ooRexx
Both examples that you providde, show that you're issuing an (invalid) command to your ksh shell, when this messages appears.
In your first example, Rexx evaluates WHILE 'B' > 'A' THEN to 1 and sends this to ksh as invalid command 1
In the second example, rexxtry evaluates version to REXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017, and then again issues this to ksh as an invalid command
Please check what happens if you directly issue e. g. 1 from within your ksh.
If you still believe this is Rexx-related, please provide Rexx sample code without ksh involvment.
---------- Forwarded message ----------
From: P.O. Jonsson linux@jonases.se linux@jonases.se
Date: Mon, Apr 17, 2017 at 8:44 PM
Subject: Fwd: [oorexx:bugs] #1439 Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: 1: not found
To: erich_st@users.sf.net
Hello Erich,
Sorry for passing the mail on, but I am on another machine doing these things.
I am on Mac OS X Sierra, 64 bit installation of ooRexx
POs-12Core-Pro:epab po$ rexx -v
Open Object Rexx Version 5.0.0
Build date: Jan 20 2017
Addressing mode: 64
I have installed ooRexx together with BSF4ooRexx and already had a similar problem earlier but with the help of Rony Flatscher I could move the catalogue file to (what we thought was the right place to silence the error message. Apparently It was not sufficient for all errors. I advice to talk to Rony to get the full picture, There is some weird issues with what Java version that is requested from BSF, but that may be totally unrelated, FYI only.
Here is the output of say errortext() apparently it works. But when I make a mistake the error comes back.Regarding the BSF version se below.
Hope this helps if not tell me what to do next.
POs-12Core-Pro:epab po$ rexx rexxtry
REXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017
rexxtry.REX lets you interactively try REXX statements.
Each string is executed when you hit Enter.
Enter 'call tell' for a description of the features.
Go on - try a few... Enter 'exit' to end.
say hello
HELLO
.............................................. rexxtry.REX on DARWIN
say errortext(28)
Invalid LEAVE or ITERATE.
.............................................. rexxtry.REX on DARWIN
version
Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: syntax error at line 1: `(' unexpected
rc = 3 ....................................... rexxtry.REX on DARWIN
-version
Oooops ! ... try again. Invalid expression.
Incorrect expression detected at "-".
rc = 35.1 .................................... rexxtry.REX on DARWIN
Status: open
Group: 5.0.0
Created: Sun Apr 16, 2017 09:26 PM UTC by Per Olov Jonsson
Last Updated: Mon Apr 17, 2017 06:05 PM UTC
Owner: nobody
Attachments:
Status: open
Group: 5.0.0
Created: Sun Apr 16, 2017 09:26 PM UTC by Per Olov Jonsson
Last Updated: Mon Apr 17, 2017 07:49 PM UTC
Owner: nobody
Attachments:
Status: open
Group: 5.0.0
Created: Sun Apr 16, 2017 09:26 PM UTC by Per Olov Jonsson
Last Updated: Mon Apr 17, 2017 07:49 PM UTC
Owner: nobody
Attachments:
Hi Per Olov,
what's the output if you run
say errortext(28)
on your system?Where from did you obtain this Mac OS build of ooRexx 5.0? Or did you build it on your own?
Hi Per Olov,
I don't see how this "corrupt file" message is related to ooRexx
Both examples that you providde, show that you're issuing an (invalid) command to your ksh shell, when this messages appears.
In your first example, Rexx evaluates
WHILE 'B' > 'A' THEN
to1
and sends this to ksh as invalid command1
In the second example, rexxtry evaluates
version
toREXX-ooRexx_5.0.0(MT)_64-bit 6.05 20 Jan 2017
, and then again issues this to ksh as an invalid commandPlease check what happens if you directly issue e. g.
1
from within your ksh.If you still believe this is Rexx-related, please provide Rexx sample code without ksh involvment.
---------- Forwarded message ----------
From: P.O. Jonsson linux@jonases.se
Date: Mon, Apr 17, 2017 at 8:44 PM
Subject: Fwd: [oorexx:bugs] #1439 Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: 1: not found
To: erich_st@users.sf.net
Hello Erich,
Sorry for passing the mail on, but I am on another machine doing these things.
I am on Mac OS X Sierra, 64 bit installation of ooRexx
POs-12Core-Pro:epab po$ rexx -v
Open Object Rexx Version 5.0.0
Build date: Jan 20 2017
Addressing mode: 64
I have installed ooRexx together with BSF4ooRexx and already had a similar problem earlier but with the help of Rony Flatscher I could move the catalogue file to (what we thought was the right place to silence the error message. Apparently It was not sufficient for all errors. I advice to talk to Rony to get the full picture, There is some weird issues with what Java version that is requested from BSF, but that may be totally unrelated, FYI only.
Here is the output of say errortext() apparently it works. But when I make a mistake the error comes back.Regarding the BSF version se below.
Hope this helps if not tell me what to do next.
Hälsningar/Regards/Grüsse,
P.O. Jonsson
linux@jonases.se
Hello Erich and thanks for your analysis. To my knowledge I have never used a korn shell, I use Bash (default on Mac OS X), which I confirmed by querying a terminal, see below. If ooRexx send the info (from an illegal command ending in the terminal session) to a korn shell or if it is interpreted by Bash as directed to ksh it is beyond my comprehension.
Let´s leave it here, I thought with a new version of 00Rexx I’ll send all feedback I can to the team. I am not harmed in any way except that I am fooled by the error message when I create an illegal ooRexx statement
Last login: Tue Apr 18 21:24:24 on console
POs-Mac-Pro:~ po$ set
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.nkv8tn4wkx/Render
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_REMATCH=([0]="o")
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="57" [3]="1" [4]="release" [5]="x86_64-apple-darwin16")
BASH_VERSION='3.2.57(1)-release'
CLASSPATH=:/Library/Frameworks/BSF4ooRexx.framework/Classes/bsf4ooRexx-v452-20150812-bin.jar
COLUMNS=80
DIRSTACK=()
EUID=501
GROUPS=()
HISTFILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.historynew
HISTFILESIZE=500
HISTSIZE=500
HOME=/Users/po
HOSTNAME=POs-Mac-Pro.Jonases
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=de_DE.UTF-8
LINES=24
LOGNAME=po
MACHTYPE=x86_64-apple-darwin16
MAILCHECK=60
NLSPATH=:/usr/local/bin/rexx.cat
OPTERR=1
OPTIND=1
OSTYPE=darwin16
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin
PIPESTATUS=([0]="0")
PPID=831
PROMPT_COMMAND=update_terminal_cwd
PS1='\h:\W \u\$ '
PS2='> '
PS4='+ '
PWD=/Users/po
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHELL_SESSION_DID_HISTORY_CHECK=1
SHELL_SESSION_DID_INIT=1
SHELL_SESSION_DIR=/Users/po/.bash_sessions
SHELL_SESSION_FILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.session
SHELL_SESSION_HISTFILE=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.history
SHELL_SESSION_HISTFILE_NEW=/Users/po/.bash_sessions/8E859BEE-9D1E-406C-B55B-8CABC8F2B532.historynew
SHELL_SESSION_HISTFILE_SHARED=/Users/po/.bash_history
SHELL_SESSION_HISTORY=1
SHELL_SESSION_TIMESTAMP_FILE=/Users/po/.bash_sessions/expiration_check_timestamp
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.VPHP27HDD7/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=388.1
TERM_SESSION_ID=8E859BEE-9D1E-406C-B55B-8CABC8F2B532
TMPDIR=/var/folders/pb/n87qg_7x1sx4jfg4bswfssvh0000gn/T/
UID=501
USER=po
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
=NLSPATH
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
shell_session_delete_expired ()
{
if ( [ ! -e "$SHELL_SESSION_TIMESTAMP_FILE" ] || [ -z "$(find "$SHELL_SESSION_TIMESTAMP_FILE" -mtime -1d)" ] ); then
local expiration_lock_file="$SHELL_SESSION_DIR/_expiration_lockfile";
if shlock -f "$expiration_lock_file" -p $$; then
echo -n 'Deleting expired sessions...';
local delete_count=$(find "$SHELL_SESSION_DIR" -type f -mtime +2w -print -delete | wc -l);
[ "$delete_count" -gt 0 ] && echo $delete_count' completed.' || echo 'none found.';
( umask 077;
touch "$SHELL_SESSION_TIMESTAMP_FILE" );
rm "$expiration_lock_file";
fi;
fi
}
shell_session_history_allowed ()
{
if [ -n "$HISTFILE" ]; then
local allowed=0;
if shopt -q histappend || [ -n "$HISTTIMEFORMAT" ]; then
allowed=${SHELL_SESSION_HISTORY:-0};
else
allowed=${SHELL_SESSION_HISTORY:=1};
fi;
if [ $allowed -eq 1 ]; then
return 0;
fi;
fi;
return 1
}
shell_session_history_check ()
{
if [ ${SHELL_SESSION_DID_HISTORY_CHECK:-0} -eq 0 ]; then
SHELL_SESSION_DID_HISTORY_CHECK=1;
if shell_session_history_allowed; then
shell_session_history_enable;
fi;
if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
unset PROMPT_COMMAND;
else
if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
PROMPT_COMMAND="${BASH_REMATCH[1]}${BASH_REMATCH[3]}";
fi;
fi;
fi
}
shell_session_history_enable ()
{
( umask 077;
touch "$SHELL_SESSION_HISTFILE_NEW" );
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
SHELL_SESSION_HISTORY=1
}
shell_session_save ()
{
if [ -n "$SHELL_SESSION_FILE" ]; then
echo -n 'Saving session...';
( umask 077;
echo 'echo Restored session: "$(date -r '$(date +%s)')"' >|"$SHELL_SESSION_FILE" );
declare -F shell_session_save_user_state > /dev/null && shell_session_save_user_state;
shell_session_history_allowed && shell_session_save_history;
echo 'completed.';
fi
}
shell_session_save_history ()
{
shell_session_history_enable;
history -a;
if [ -f "$SHELL_SESSION_HISTFILE_SHARED" ] && [ ! -s "$SHELL_SESSION_HISTFILE" ]; then
echo -ne '\n...copying shared history...';
( umask 077;
cp "$SHELL_SESSION_HISTFILE_SHARED" "$SHELL_SESSION_HISTFILE" );
fi;
echo -ne '\n...saving history...';
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE_SHARED" );
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE" );
: >|"$SHELL_SESSION_HISTFILE_NEW";
if [ -n "$HISTFILESIZE" ]; then
echo -n 'truncating history files...';
HISTFILE="$SHELL_SESSION_HISTFILE_SHARED";
HISTFILESIZE="$HISTFILESIZE";
HISTFILE="$SHELL_SESSION_HISTFILE";
HISTFILESIZE="$size";
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
fi;
echo -ne '\n...'
}
shell_session_update ()
{
shell_session_save && shell_session_delete_expired
}
update_terminal_cwd ()
{
local url_path='';
{
local i ch hexch LC_CTYPE=C LC_ALL=;
for ((i = 0; i < ${#PWD}; ++i))
do
ch="${PWD:i:1}";
if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
url_path+="$ch";
else
printf -v hexch "%02X" "'$ch";
url_path+="%${hexch: -2:2}";
fi;
done
};
printf '\e]7;%s\a' "file://$HOSTNAME$url_path"
}
Hälsningar/Regards/Grüsse,
P.O. Jonsson
per-olov.jonsson@kabelmail.de
Related
Bugs:
#1439Hello Erich, sorry to bother you again but I wanted to give you the full picture
After the latest BSF Install I got similar error messages from ooRexx.
Copying rexx.cat (the error catalogue as I understands it)
FROM
/Library/Frameworks/ooRexx.framework/Versions/A/Commands/rexx.cat
TO
/usr/local/bin
Where ooRexx and BSF are installed solved that problem. Hence my assumption that this was something similar.
I did the test for all shells I could find and indeed the korn shell reported an error.
Here is the complete settings on the machine where I hade the original problem, please look at paths/classpaths and see if they are ok.
At the end the printouts confirming the problem with the Ksh.
That is all. I´ll report the korn shell problem to Apple, I have it on 3/3 machines. Thanks for letting me know-
Last login: Tue Apr 18 22:37:24 on ttys002
POs-12Core-Pro:~ po$ set
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.4kyJnn8wKs/Render
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_REMATCH=([0]="o")
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="57" [3]="1" [4]="release" [5]="x86_64-apple-darwin16")
BASH_VERSION='3.2.57(1)-release'
CLASSPATH=:/Library/Frameworks/BSF4ooRexx.framework/Classes/bsf4ooRexx-v600-20170405-bin.jar
COLUMNS=80
DIRSTACK=()
EUID=501
GROUPS=()
HISTFILE=/Users/po/.bash_sessions/4B294CB0-F76A-4AB7-A18F-50880B69DDF4.historynew
HISTFILESIZE=500
HISTSIZE=500
HOME=/Users/po
HOSTNAME=POs-12Core-Pro.Jonases
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=de_DE.UTF-8
LINES=24
LOGNAME=po
MACHTYPE=x86_64-apple-darwin16
MAILCHECK=60
NLSPATH=:/usr/local/bin/rexx.cat
OPTERR=1
OPTIND=1
OSTYPE=darwin16
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin
PIPESTATUS=([0]="0")
PPID=13920
PROMPT_COMMAND=update_terminal_cwd
PS1='\h:\W \u\$ '
PS2='> '
PS4='+ '
PWD=/Users/po
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHELL_SESSION_DID_HISTORY_CHECK=1
SHELL_SESSION_DID_INIT=1
SHELL_SESSION_DIR=/Users/po/.bash_sessions
SHELL_SESSION_FILE=/Users/po/.bash_sessions/4B294CB0-F76A-4AB7-A18F-50880B69DDF4.session
SHELL_SESSION_HISTFILE=/Users/po/.bash_sessions/4B294CB0-F76A-4AB7-A18F-50880B69DDF4.history
SHELL_SESSION_HISTFILE_NEW=/Users/po/.bash_sessions/4B294CB0-F76A-4AB7-A18F-50880B69DDF4.historynew
SHELL_SESSION_HISTFILE_SHARED=/Users/po/.bash_history
SHELL_SESSION_HISTORY=1
SHELL_SESSION_TIMESTAMP_FILE=/Users/po/.bash_sessions/expiration_check_timestamp
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.0cjhbXe5oa/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=388.1
TERM_SESSION_ID=4B294CB0-F76A-4AB7-A18F-50880B69DDF4
TMPDIR=/var/folders/yp/791d28pj3qs39p22_rxh19yr0000gn/T/
UID=501
USER=po
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
=NLSPATH
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
shell_session_delete_expired ()
{
if ( [ ! -e "$SHELL_SESSION_TIMESTAMP_FILE" ] || [ -z "$(find "$SHELL_SESSION_TIMESTAMP_FILE" -mtime -1d)" ] ); then
local expiration_lock_file="$SHELL_SESSION_DIR/_expiration_lockfile";
if shlock -f "$expiration_lock_file" -p $$; then
echo -n 'Deleting expired sessions...';
local delete_count=$(find "$SHELL_SESSION_DIR" -type f -mtime +2w -print -delete | wc -l);
[ "$delete_count" -gt 0 ] && echo $delete_count' completed.' || echo 'none found.';
( umask 077;
touch "$SHELL_SESSION_TIMESTAMP_FILE" );
rm "$expiration_lock_file";
fi;
fi
}
shell_session_history_allowed ()
{
if [ -n "$HISTFILE" ]; then
local allowed=0;
if shopt -q histappend || [ -n "$HISTTIMEFORMAT" ]; then
allowed=${SHELL_SESSION_HISTORY:-0};
else
allowed=${SHELL_SESSION_HISTORY:=1};
fi;
if [ $allowed -eq 1 ]; then
return 0;
fi;
fi;
return 1
}
shell_session_history_check ()
{
if [ ${SHELL_SESSION_DID_HISTORY_CHECK:-0} -eq 0 ]; then
SHELL_SESSION_DID_HISTORY_CHECK=1;
if shell_session_history_allowed; then
shell_session_history_enable;
fi;
if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
unset PROMPT_COMMAND;
else
if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
PROMPT_COMMAND="${BASH_REMATCH[1]}${BASH_REMATCH[3]}";
fi;
fi;
fi
}
shell_session_history_enable ()
{
( umask 077;
touch "$SHELL_SESSION_HISTFILE_NEW" );
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
SHELL_SESSION_HISTORY=1
}
shell_session_save ()
{
if [ -n "$SHELL_SESSION_FILE" ]; then
echo -n 'Saving session...';
( umask 077;
echo 'echo Restored session: "$(date -r '$(date +%s)')"' >|"$SHELL_SESSION_FILE" );
declare -F shell_session_save_user_state > /dev/null && shell_session_save_user_state;
shell_session_history_allowed && shell_session_save_history;
echo 'completed.';
fi
}
shell_session_save_history ()
{
shell_session_history_enable;
history -a;
if [ -f "$SHELL_SESSION_HISTFILE_SHARED" ] && [ ! -s "$SHELL_SESSION_HISTFILE" ]; then
echo -ne '\n...copying shared history...';
( umask 077;
cp "$SHELL_SESSION_HISTFILE_SHARED" "$SHELL_SESSION_HISTFILE" );
fi;
echo -ne '\n...saving history...';
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE_SHARED" );
( umask 077;
cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE" );
: >|"$SHELL_SESSION_HISTFILE_NEW";
if [ -n "$HISTFILESIZE" ]; then
echo -n 'truncating history files...';
HISTFILE="$SHELL_SESSION_HISTFILE_SHARED";
HISTFILESIZE="$HISTFILESIZE";
HISTFILE="$SHELL_SESSION_HISTFILE";
HISTFILESIZE="$size";
HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
fi;
echo -ne '\n...'
}
shell_session_update ()
{
shell_session_save && shell_session_delete_expired
}
update_terminal_cwd ()
{
local url_path='';
{
local i ch hexch LC_CTYPE=C LC_ALL=;
for ((i = 0; i < ${#PWD}; ++i))
do
ch="${PWD:i:1}";
if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
url_path+="$ch";
else
printf -v hexch "%02X" "'$ch";
url_path+="%${hexch: -2:2}";
fi;
done
};
printf '\e]7;%s\a' "file://$HOSTNAME$url_path <file: $hostname$url_path="">"
}</file:>
POs-12Core-Pro:~ po$ bash -version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)
Copyright (C) 2007 Free Software Foundation, Inc.
POs-12Core-Pro:~ po$ tcsh --version
tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec
POs-12Core-Pro:~ po$ csh --version
tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec
POs-12Core-Pro:~ po$
POs-12Core-Pro:~ po$ zsh --version
zsh 5.2 (x86_64-apple-darwin16.0)
POs-12Core-Pro:~ po$
POs-12Core-Pro:~ po$ ksh -version
$ .sh.subscript=$(tput cuu1 2>/dev/null)Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.Message Catalog System: corrupt file.ksh: line 1: /dev/null: restricted
Hälsningar/Regards/Grüsse,
P.O. Jonsson
per-olov.jonsson@kabelmail.de
Related
Bugs:
#1439Hi Per Olov,
I don't think ooRexx should have
ksh
as the default environment on Darwin.Can you please give us the output of
rexx -e "say 'initial' address(); address 'bash' 'pwd'; say 'bash' rc; address 'ksh' 'pwd'; say 'ksh' rc"
on your system?
Hello again, sorry for the delay,
On the machine with ooRexx 5.00 (from recent BSF installation) where I had the behavior
Last login: Wed Apr 19 10:58:32 on ttys000
POs-12Core-Pro:~ po$ rexx -e "say 'initial' address(); address 'bash' 'pwd'; say 'bash' rc; address 'ksh' 'pwd'; say 'ksh' rc"
initial ksh
/Users/po
bash 0
/Users/po
ksh 0
POs-12Core-Pro:~ po$
On another machine with ooRexx 4.2 still
Last login: Wed Apr 19 14:55:15 on console
POs-Mac-Pro:~ po$ rexx -e "say 'initial' address(); address 'bash' 'pwd'; say 'bash' rc; address 'ksh' 'pwd'; say 'ksh' rc"
initial bash
/Users/po
bash 0
/Users/po
ksh 0
POs-Mac-Pro:~ po$
I have no recollection of having changed on purpose, when I list the settings it reports Bash as my normal shell.
Hope this helps.
Hälsningar/Regards/Grüsse,
P.O. Jonsson
per-olov.jonsson@kabelmail.de
Dear Erich,
If you want to dig at the source I can offer you to log on from Remote on the machine in question, just let me know and I will open it up for you.
It is a developer machine so I have no private data on it.
Hälsningar/Regards/Grüsse,
P.O. Jonsson
per-olov.jonsson@kabelmail.de
Related
Bugs:
#1439This is not a bug in ooRexx so I suggest to close this ticket; for some reason my MAC used the wrong shell.
Closing as suggested.
Opening [bugs:#1494] to change initial evnironment from
ksh
tobash
Related
Bugs:
#1494