stdout

  1. tembun

    Shell What is the best way to implement -y (yes) option for POSIX shell script?

    Suppose we have two scripts: one that prompts for the input and one that acts as a wrapper for the first one: prompt: #!/bin/sh printf "Enter: " 1>&2 read input echo "You entered: ${input}" wrapper: #!/bin/sh ./prompt Now imagine that we want to implement the behaviour for the wrapper that...
  2. gotnull

    Solved How to print a variable on STDOUT while still have the hand

    Hello, Is it possible to display a variable on STDOUT and keep the hand in order to use/edit it ? I've tried to remove the carriage return or newline with tr , or changing IFS but that didn't work. So after few hours on this I just wonder if it is possible, if yes what command/tool can do...
Back
Top