Differences between revisions 2 and 3
Revision 2 as of 2005-10-25 14:24:52
Size: 1229
Editor: cvfftp
Comment: yesterday
Revision 3 as of 2005-10-25 14:32:43
Size: 1258
Editor: cvfftp
Comment: sequential numbers
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
 * How can I redirect file names using sequential numbers to avoid overwriting existing ones?  * How can I redirect file names using sequential numbers to avoid overwriting existing ones? Answer: mv --backup=numbered

Bash Open Questions

If you want to help with the BashFaq, you could try to answer one of the following questions. Just answer it, copy it to the BashFaq page, and remove the question here.

  • How can I redirect the output of the script to both standard output and a log file? Answer: duplicating fds is not sufficient, because it duplicates the file descriptor number, not the data. But you can still use tee.

  • Somewhere the content of variables in my script lose whitespace. Answer: _echo "$var" - quoting_
  • How can I ensure that only once instance of my script is running at a time? Answer: e.g. lockfile. This should be answered in the UnixFaq

  • How can I handle command line arguments in a shell script? Answer: getopts(1)

  • How can I have variable variables, e.g. myvar=prefix$othervar? Answer: eval(1)

  • How can I make bash set the xterm title to the command it is currently executing?
  • How to determine Yesterday's date? Answer: date -d'yesterday'
  • How to convert Unix time stamps to a date (and vice versa)? Answer: GNU date, awk+strftime()
  • How to redirect stderr to a pipeline?
  • How can I redirect file names using sequential numbers to avoid overwriting existing ones? Answer: mv --backup=numbered

BashOpenQuestions (last edited 2023-06-23 18:42:54 by larryv)