TSE Grep for Linux

19 views
Skip to first unread message

S.E. Mitchell

unread,
Sep 1, 2025, 10:05:25 PMSep 1
to TSEPro Support
https://semware.com/files/tse-pro-install/grep.zip

Let me know if it works for you.

zhong zhao

unread,
Sep 1, 2025, 11:29:38 PMSep 1
to SemWare TSE Pro text editor
On my Ubuntu 18.04 in VMWare,-s option is no response.

viewmicro@viewmicro-pc:~/tse$ ./grep
SemWare Grep v2.1 for linux [Sep  1 2025]
usage: grep [-bcfimnsvwx01_ -c- -f-] searchstring [file(s)] [-@ file.list]

-0  display file names only
-1  display first matching line only
-b  blank before fn line
-c  show count of matching lines
-c- do not display copyright message
-f  display filename on each line
-f- do not display any filenames
-i  ignore case
-m  display only non-matching lines
-n  display line numbers
-s  search subdirectories (-d accepted too)
-v  verbose
-w  words only
-x  use regular expressions (same syntax as TSE Pro)
-_  remove '_' from the wordset - effects -w
-@ fn (must be last arg) adds files in 'fn' to list of files to search
viewmicro@viewmicro-pc:~/tse$ ./grep -s0 main *.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep -s0 'main' *.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep -s0 'main' src/*.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ls src
diffhhmmssxxx1.c  diffhhmmssxxx2.c  diffnum1.c  diffnum2.c  dtsz_files.cpp  hexdump.c  js.cpp  rand.c
viewmicro@viewmicro-pc:~/tse$ ./grep -s0 main src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep  main src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffnum1.c
int main() {
viewmicro@viewmicro-pc:~/tse$ ./grep -0 main src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffnum1.c
viewmicro@viewmicro-pc:~/tse$ ./grep -x  m..n src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffnum1.c
int main() {
    printf("diffnum1 from in.txt to out.txt\n");
viewmicro@viewmicro-pc:~/tse$ ./grep -x -0 m..n src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffnum1.c
viewmicro@viewmicro-pc:~/tse$ ./grep -0 main src/diffnum1.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffnum1.c
viewmicro@viewmicro-pc:~/tse$ ./grep -0 main src/*.c
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffhhmmssxxx1.c
File: /home/viewmicro/tse/src/diffhhmmssxxx2.c
File: /home/viewmicro/tse/src/diffnum1.c
File: /home/viewmicro/tse/src/diffnum2.c
File: /home/viewmicro/tse/src/hexdump.c
File: /home/viewmicro/tse/src/rand.c
viewmicro@viewmicro-pc:~/tse$ ./grep -0 -d main *.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep -0 -d main *
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep -0 -d main src/*
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ ./grep -n main src/*
SemWare Grep v2.1 for linux [Sep  1 2025]
File: /home/viewmicro/tse/src/diffhhmmssxxx1.c
7: int main() {
File: /home/viewmicro/tse/src/diffhhmmssxxx2.c
7: int main() {
File: /home/viewmicro/tse/src/diffnum1.c
45: int main() {
File: /home/viewmicro/tse/src/diffnum2.c
45: int main() {
File: /home/viewmicro/tse/src/dtsz_files.cpp
38: int main(int argc,char**argv) {
File: /home/viewmicro/tse/src/hexdump.c
39: int main(int argc,char **argv) {
File: /home/viewmicro/tse/src/js.cpp
614: int main(int argc, char **argv) {
File: /home/viewmicro/tse/src/rand.c
20: void main(int argc,char **argv) {
viewmicro@viewmicro-pc:~/tse$ ./grep -s main /home/viewmicro/tse/*.c
SemWare Grep v2.1 for linux [Sep  1 2025]
viewmicro@viewmicro-pc:~/tse$ 

S.E. Mitchell

unread,
Sep 1, 2025, 11:34:03 PMSep 1
to sem...@googlegroups.com
I can reproduce this.
Rats :(
--
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/semware/33d1bc45-5cbd-4361-9116-16cc31fa185an%40googlegroups.com.

Guy Rouillier

unread,
Sep 2, 2025, 12:00:17 AMSep 2
to sem...@googlegroups.com
On Mon, 2025-09-01 at 22:05 -0400, S.E. Mitchell wrote:
> https://semware.com/files/tse-pro-install/grep.zip
>
> Let me know if it works for you.

When I unzipped the file, grep was not marked executable. "chmod +x grep"
fixed that. Trying to get this to work inside the editor, I was concerned
about name clash with the system grep, so I renamed the TSE binary grep.exe.
I then tried executing the grep.s macro. I got the prompt and filled it in,
but when I ran it, I got no response.

Fortunately, the now very old grep macro authored by Chris Antos still works!

Ubuntu MATE 25.04

--
Guy Rouillier

knud van eeden

unread,
Sep 2, 2025, 4:38:36 AMSep 2
to TSEPro Support
grep command line for Linux unzipped out of the box works OK here in Linux WSL (Ubuntu)

Renamed it to greplinux.

with friendly greetings
Knud van Eeden

Inline image



On Tuesday, September 2, 2025 at 04:05:33 AM GMT+2, S.E. Mitchell <sammy.m...@gmail.com> wrote:


--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.

knud van eeden

unread,
Sep 2, 2025, 5:13:39 AMSep 2
to TSEPro Support
On Linux non-WSL (Ubuntu) command line TSE grep works OK.

Renamed to greplinux first.

As indicated one should currently make greplinux executable
first using 

chmod +x greplinux

with friendly greetings
Knud van Eeden

Inline image








On Tuesday, September 2, 2025 at 04:05:33 AM GMT+2, S.E. Mitchell <sammy.m...@gmail.com> wrote:


knud van eeden

unread,
Sep 2, 2025, 5:17:35 AMSep 2
to sem...@googlegroups.com
Same here with -s, does not go beyond the current directory.


Guy Rouillier

unread,
Sep 2, 2025, 5:24:23 AMSep 2
to sem...@googlegroups.com
I don't see how it could have possibly worked out of the box, as it isn't marked as executable.

Nevertheless, after chmod to make it executable, the supplied grep worked from the command line.  But it is not working from the grep.s macro inside the editor.  I renamed it grep.exe as that is what the macro is looking for.  Of course, we can always change the macro to look for a different name.

On Tue, 2025-09-02 at 08:38 +0000, 'knud van eeden' via SemWare TSE Pro text editor wrote:
grep command line for Linux unzipped out of the box works OK here in Linux WSL (Ubuntu)

Renamed it to greplinux.

with friendly greetings
Knud van Eeden

Inline image



On Tuesday, September 2, 2025 at 04:05:33 AM GMT+2, S.E. Mitchell <sammy.m...@gmail.com> wrote:



-- 
Guy Rouillier

knud van eeden

unread,
Sep 2, 2025, 5:39:01 AMSep 2
to sem...@googlegroups.com
Inline image


> I don't see how it could have possibly worked out of the box, as it isn't marked as executable.

Actually it does work out of the box in Linux WSL
(unzipped the original 'grep' from the .zip file and did run it with ./grep and that worked out of the box)

Note: Linux WSL is not Linux not-WSL thus, 
as indicated we should have a LINUXWSL and LINUXNONWSL directive thus
as many significant differences between the 2 environments,
in order to be able to automate out of the box.

#IFDEF LINUXWSL 

#IFDEF LINUXNONWSL


--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion visit

knud van eeden

unread,
Sep 2, 2025, 2:57:13 PMSep 2
to sem...@googlegroups.com
> ... after chmod to make it executable, the supplied grep worked from the command line.  But it is not working from the grep.s macro inside the editor.  I renamed it grep.exe as that is what the macro is looking for.  Of course, we can always change the macro to look for a different name.

I looked into it.

It is of course a very optimistic approach to believe that a grep.s program that is explicitly designed for TSE for Microsoft Windows will suddenly start
working in Linux.

For example in grep.s a file called 'tee32.exe' is looked for, but in TSE for Linux that file does not exist at all.

And so on...

===

> Fortunately, the now very old grep macro authored by Chris Antos still works!
> Ubuntu MATE 25.04

That Chris Antos' grep works by only one change (=e.g. only a filename change from grep.exe to grep) is quite remarkable. 

Chris Antos' TSE programs are usually very complex and require a lot of special internal and internal knowledge configuration to get those programs working.

I looked into his grep3230, it has e.g. DLLs (see screenshot), how on earth is that going to run on Linux non-WSL? 
There on Linux non-WSL one uses .so file or something similar instead of DLLs.

Maybe on Linux WSL you could get it running because that supports Microsoft Windows DLLs.

Or exactly which Antos grep program was used to get it working? 

If possible upload or send a URL where to download that Chris Antos' grep to check and test.

Thanks 

Guy Rouillier

unread,
Sep 2, 2025, 10:18:39 PMSep 2
to sem...@googlegroups.com
Yes, I will work on uploading my modified version of Chris's grep that works under both Windows and Linux.
--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages