From 98e15d2e6cc8003f2432e7d40bf757af81b758c5 Mon Sep 17 00:00:00 2001 From: Andrea Fiorencis Date: Thu, 26 Mar 2026 09:26:18 +0100 Subject: [PATCH] Implementato comando `echo` senza redirect su file --- simulatore.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulatore.html b/simulatore.html index f91b6a4..5abfd48 100644 --- a/simulatore.html +++ b/simulatore.html @@ -3757,7 +3757,7 @@ $ rm /mnt/verifica.txt if(c0==="touch"&&t[1]){const r=fileTouch(t[1]);if(r.msg)termPrint(r.msg,r.ok?"dim":"err");render();scenarioCheck();return;} if(c0==="rm"&&t[1]){const r=fileRm(t[1]);if(r.msg)termPrint(r.msg,r.ok?"dim":"err");render();scenarioCheck();return;} if(c0==="cat"&&t[1]&&t[1]!=="/proc/mdstat"){const r=fileCat(t[1]);termPrint(r.msg,r.ok?"dim":"err");render();scenarioCheck();return;} - if(c0==="echo"){const gt=t.indexOf(">");if(gt<0)return termPrint('echo: usa: echo "testo" > /mnt/file',"err");const text=t.slice(1,gt).join(" ");const path=t[gt+1];if(!path)return termPrint("echo: manca destinazione.","err");const r=fileEchoTo(text,path);if(r.msg)termPrint(r.msg,r.ok?"dim":"err");render();scenarioCheck();return;} + if(c0==="echo"){const gt=t.indexOf(">");if(gt<0)return termPrint(t[1],"dim");const text=t.slice(1,gt).join(" ");const path=t[gt+1];if(!path)return termPrint("echo: manca destinazione.","err");const r=fileEchoTo(text,path);if(r.msg)termPrint(r.msg,r.ok?"dim":"err");render();scenarioCheck();return;} if(c0==="conclude"){ const text=t.slice(1).join(" ");if(!text)return termPrint("Uso: conclude ","err"); termPrint("Annotazione registrata (didattica).","ok");