Linked Questions

2 votes
0 answers
41 views

I hope that this question won't be too ambiguous. I would like to achieve following thing. [user@host]# ./my_program SET THIS AS NEXT COMMAND THAT YOU CAN EDIT [user@host]# SET THIS AS NEXT COMMAND ...
Alex Baranowski's user avatar
0 votes
0 answers
23 views

I use bash 4.4. How do I print the a file to command line. For example, $ printf "HELLO" > file $ my-command file $ HELLO where the HELLO in the last line shows after the second command is run. ...
Vito Chou's user avatar
  • 301
27 votes
7 answers
3k views

One might think that echo foo >a cat a | rev >a would leave a containing oof; but instead it is left empty. Why? How would one otherwise apply rev to a?
Toothrot's user avatar
  • 3,715
34 votes
3 answers
4k views

I was just reading the readline man-page and discovered a bunch of great commands I didn't know about. However, several don't have default key bindings. Is there a way to execute the unbound commands ...
erikcw's user avatar
  • 441
6 votes
2 answers
1k views

I can not find a way to do that from bash. So Is there a way to define a bash readline shortcut that will insert a dynamically generated string at the position of the cursor? E.g., I want to insert ...
Big Shield's user avatar
10 votes
1 answer
6k views

It seems that a simple shell redirect from /dev/ptmx gets me a new pseudo-terminal. $ ls /dev/pts; ls /dev/pts </dev/ptmx 0 1 2 ptmx 0 1 2 3 ptmx It disappears as soon as the process that ...
mikeserv's user avatar
  • 59.4k
4 votes
4 answers
2k views

I know what I can make a shell procedure or source the script instead of running it to cd the shell I am using. What I want to know is there any way to cd the "parent shell" (not sure if that is the ...
Captain Man's user avatar
  • 1,218
5 votes
3 answers
281 views

I am on the bash shell and I want the output of a command to appear directly in the command prompt that appears after the command has executed ! Example of what I envision it, to illustrate my idea: ...
ledawg's user avatar
  • 151
3 votes
1 answer
2k views

I was thinking about self-referential lists in Haskell - for example you might have the following script, fibonacci.hs: #!/usr/bin/env runghc fibs :: [Integer] fibs = 1:1:(zipWith (+) fibs $ tail ...
Izaak van Dongen's user avatar
4 votes
1 answer
2k views

We all know this annoying issue: $ printf "abc" > some-file $ cat some-file abc$ which tends to mess up the prompt if it is any more complex than $, throws off the current cursor position and ...
Claudius's user avatar
  • 161
0 votes
4 answers
1k views

I'm trying to replicate the behavior of the history builtin: specifically when you do !<line # of command> and it's just replaced with the command at line #. Let's say that I have a file with ...
puppydog's user avatar
  • 101
1 vote
1 answer
657 views

While reading the answers of question Can bash write to its own input stream?, I found the following command runs on zsh but not on bash : print -z echo mnciitbhu 1 . Is -z an extension to the print ...
0x6773's user avatar
  • 115
8 votes
1 answer
325 views

I have experienced similar behaviour before, but only now I can reproduce it: Output from a command affecting the text after the next command prompt, ready to be Entered by the user. Take the ...
Quasimodo's user avatar
  • 133
3 votes
1 answer
226 views

Is there a way to view your entire kill-ring besides repededly hitting M-y Somthing like emacs browse-kill-ring but for the shell
Nifle's user avatar
  • 569
0 votes
1 answer
536 views

I defined a simple function prepend (below) that should automatically place a repeated term of a bash command in the following input prompts. For example, by typing prepend git in the terminal, all ...
SWV's user avatar
  • 101

15 30 50 per page