Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • i dont have a graphical desktop environment. and i cant install other shells so i am limited in my actions Commented Dec 21, 2018 at 10:00
  • @WingZero, in that case you cannot use the method in this answer. Is RoVo's method with a trap working for you? Commented Dec 21, 2018 at 10:03
  • hey, i just update my initial question, because the comment section was to small Commented Dec 21, 2018 at 10:07
  • problem is i am a novice in shell scripting, so i don't know where the trap method from @RoVo needs to fit in Commented Dec 21, 2018 at 10:08
  • @WingZero, I added an alternative with the trap method to my answer. Try that shellscript and edit it to make it do what you want. Commented Dec 21, 2018 at 10:46