-1

I'm building a simple operating system (github.com/aarikpokras/aarikos). I searched the entire internet and I can't seem to find a single effective method to append to a file! For some reason, when I try something like echo "content" >> /file, it says that there's some syntax error. I tried the same with cat, but it didn't help either. Any help is appreciated. Thanks.

13
  • 1
    I don't see why there should be one. GRUB isn't an operating system, just the world's most configurable bootloader.
    – user253751
    Feb 22, 2023 at 22:10
  • in fact I'm surprised you can even make a simple command prompt in GRUB!
    – user253751
    Feb 22, 2023 at 22:32
  • Well, thanks, @user253751, I'm flattered! But, how would I make some operating system with simple code (I guess) with a kernel? Because that requires C, C++ and assembly language, and I really don't like those... Also, are you on GitHub? Because I'd really appreciate help on this if you have the time.
    – theguy123
    Feb 22, 2023 at 22:43
  • By using all that stuff you don't like. There's a reason most people don't write operating systems. But, you get the chance to do something unique! If you really don't like C, C++ or assembly language... how about doing the bare minimum to make the computer run Python, or something like that, and then writing your operating system in Python? Yeah, it's weird, but why not?
    – user253751
    Feb 22, 2023 at 22:44
  • 1
    Yes, but I'm not going to write an operating system for you, sorry (not in Python or any other language)
    – user253751
    Feb 22, 2023 at 22:52

1 Answer 1

0

grub has very limited write support. Usually it just writes into a single sector, see the save_env (docs) command which writes into a pre-populated sector. There is also a lack of shell redirection, which is the reason for the failure.

1
  • Thank you so much. I found a way to integrate that and I’ll put you in the thanks file.
    – theguy123
    Feb 24, 2023 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .