07 June 2023, 18:17 | #1 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
How to select a filename "$file.$$" from shell?
Found a file "$file.$$" in a directory I wanted to delete from Shell, but usual apostrophe ' to select wildcards literally doesn't work ('$file.'$'$)...
What should I type from shell to perform a simple "list $file.$$" or "del $file.$$"? |
07 June 2023, 19:03 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
The simple list $file.$$ works for me.
Make sure that you don't have a variable called file set because $file will always be replaced by the variable contents. Try unset file unsetenv file list $file.$$ If everything else fails and you only want to get rid of the file, use true wildcards: delete ?file.?? |
09 June 2023, 16:04 | #3 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
I don't have $file var set...
Mmmh... possibily a bug in SFS filesystem...? A simple: Code:
Echo >SYS:$file.$$ Ciao Delete SYS:$file.$$ When it fails it just does nothing and the shell prompt goes to a new line like an empty RETURN stroke. Anyway thanks for confirming it is NOT a special char ($) issue with the AmigaOS as I initially thought. Last edited by hexaae; 09 June 2023 at 16:17. |
10 June 2023, 00:22 | #4 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,303
|
Do you wait some seconds between command launches?
|
10 June 2023, 11:54 | #5 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Of course...
EDIT: ok, it seems a KingCON problem... it can List/Delete a SYS:$file without issues, but seems to forcibly expand (non-existent) var when using $file.$$ on a command line. Last edited by hexaae; 10 June 2023 at 12:37. |
10 June 2023, 12:47 | #6 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
KingCON does not do that.
What happens if you enter echo $file ? Use set echo on to see which command is executed after variable substitution. |
10 June 2023, 14:10 | #7 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Yeah... tested booting without SSeq, and just mounting KCON it doesn't happen so it must be something else... Moreover it fails (nothing happens) first time I use "delete SYS:$file.$$" also with VincEd console. If I try again the same command it works from now on... So strange.
Already snooped with SnoopDos and when it fails it actually expands $file as a var (non-existent)... Still have to understand why as I was able to reproduce it even from OS3.9 fresh install + KCON... I have an OS3.9 BBag3 installation (with some customizations), and: console.device 44.10 (12-Mar-2003) shell 45.7 (13-Gen-2002) |
10 June 2023, 14:31 | #8 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Installed http://m68k.aminet.net/package/util/boot/ShellUpdate by THOR, and when I try a delete nothing appears under SnoopDos (!!) and shell now simply says:
Code:
[3.Workbench:] del $file.$$ object name invalid I know <$$> in a script represents the CLI process number under AmigaDOS. Last edited by hexaae; 10 June 2023 at 16:11. |
11 June 2023, 19:19 | #9 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,216
|
Quote:
Note that $$ is an invalid variable name, thus the error. That should be consistent with the latest shell. If I recall correctly, you should be able to escape the $ as *$ if you really mean the literal $ sign. Note that there is (unfortunately) another set of rules active for "Execute", where the $ sign has just another meaning (*sigh*). You can, however, change that at the top of the script. ".dol" was, if I recall correctly, the way how to change the sign for "Parameter substitution" (not shell variables). Yes, that's a big pile of mess... |
|
15 June 2023, 14:35 | #10 |
Bug hunter
Join Date: Jul 2006
Location: Italy
Age: 48
Posts: 2,161
|
Thank you Thomas.
Indeed the *$$ does work (I only tried '$ for wildcards that didn't work): Last edited by hexaae; 15 June 2023 at 14:40. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Query about "all" wildcard in Shell | Foebane | support.Apps | 6 | 05 January 2020 14:08 |
ClassicWB: How can I launch "GamesMenu" from Shell? | Foebane | support.Apps | 21 | 26 October 2018 19:33 |
CD and HDD volumes: "Select Archive or Plain File" | Foebane | support.WinUAE | 18 | 05 February 2017 19:19 |
"Don't select more than 8 diferent VGA modes" - Indi AGA | TenLeftFingers | support.Hardware | 3 | 26 May 2016 04:18 |
Auto-position the "Select a floppy disk image file..." menu | Maren | request.UAE Wishlist | 17 | 30 January 2010 15:44 |
|
|