In 18.04 this code worked just fine
#!/bin/bash
# Opens Libreofice most recent version of Weekly Task Sheet using zsh
# Following creating the script, at root terminal command evaluate chmod 755 tasksheet
# to set permissions; then execute with ./tasksheet
# linuxcommand.org/lc3_wss0010.php
zsh -c 'soffice <path>/WeeklyTaskSheet/*.odt(om[1])'
I am not finding where to put it in 22.04. I have no error messages to report as I have yet to find where it belongs. I find a /bin/bash file but when I cat/bin/bash I get machine language, nothing that is welcoming to edit.
@rexypoo It was done a long time ago in 18.04 and the entire incident today is following a computer hardware upgrade with the old box now recycled.
@usr68186 here is a little progress based on suggestions so far. The script is now in a file in what I think is my home folder.
Returning to this and following the suggestions, here is what I get
roger@roger-Precision-Tower-3620:~$ ls -l tasksheet
-rw-rw-r-- 1 roger roger 70 Nov 8 19:10 tasksheet
roger@roger-Precision-Tower-3620:~$ ls
Desktop Documents Downloads Music Pictures Public snap tasksheet Templates Videos
roger@roger-Precision-Tower-3620:~$ cat tasksheet
zsh -c 'soffice LS220DB8F0/AWP/WPGenerl/WeeklyTaskSheet/*.odt(om[1])'
roger@roger-Precision-Tower-3620:~$
After running chmod, I still am falling short:
roger@roger-Precision-Tower-3620:~$ ls -l tasksheet
-rwxrwxr-x 1 roger roger 70 Nov 8 19:10 tasksheet
roger@roger-Precision-Tower-3620:~$ .tasksheet
.tasksheet: command not found
I found "Open in Terminal" as a way to access the NAS drive and now think the problem is in how I am describing the path to the executable. Here is what I got back when I modified my script
zsh -c 'soffice /run/user/1000/gvfs/smb-share:server=ls220db8f0,share=share$ /AWP/WPGenerl/WeeklyTaskSheet/*.odt(om[1])'
roger@roger-Precision-Tower-3620:/bin$ ./ tasksheet
bash: ./: Is a directory
You are INCREDIBLY patient with me. I sure think I followed your instructions, but am still not there yet
roger@roger-Precision-Tower-3620:~$ mkdir bin
roger@roger-Precision-Tower-3620:~$ ls
bin Documents Music Public tasksheet Videos
Desktop Downloads Pictures snap Templates
roger@roger-Precision-Tower-3620:~$ pwd
/home/roger
roger@roger-Precision-Tower-3620:~$ mv tasksheet /home/roger/bin/tasksheet
roger@roger-Precision-Tower-3620:~$ ls
bin Documents Music Public Templates
Desktop Downloads Pictures snap Videos
roger@roger-Precision-Tower-3620:~$ cd bin
roger@roger-Precision-Tower-3620:~/bin$ ls
tasksheet
roger@roger-Precision-Tower-3620:~/bin$ ./tasksheet
zsh:1: no matches found: /AWP/WPGenerl/WeeklyTaskSheet/*.odt(om[1])
roger@roger-Precision-Tower-3620:~/bin$ pwd
/home/roger/bin
roger@roger-Precision-Tower-3620:~/bin$ ls
tasksheet
roger@roger-Precision-Tower-3620:~/bin$ tasksheet
tasksheet: command not found
roger@roger-Precision-Tower-3620:~/bin$ pwd
/home/roger/bin
roger@roger-Precision-Tower-3620:~/bin$
tasksheet
should be in the folder/home/username
where the username may berogo
.code
. Having said that, the screenshot was useful. Run the commandls -l tasksheet
and paste the output in your question. My guess is the ownership has changed somehow.