Problem with Linux shell scripting (using VIM)

Problem with Linux shell scripting (using VIM):

I’m completely new to this, so this might be a basic question: For my Linux assignment I am supposed to write a shell script, using the VIM editor. It’s just a handfull of commands one by one, so far so good, I got the file up and running and all commands are fine except 2: – history: typed into the Linux command line, it works fine, showing me my recent commands, but included in the script, it just won’t excecute. Nothing shows up. – top: works fine in the script, but since it needs a manual quit, it kind of stops my script from running, cause it won’t stop by itself. I tried “timeout 3s top” but then nothing happens for those 3 seconds, and I won’t get any output.

I tried googleing all day, but I’m running out of ideas. Could someone point me in the right direction here?

submitted by /u/Conny21
[link] [comments] via Linux 101 stuff. Questions are encouraged, noobs are welcome!