I often use the space-backslash combination ( ) to split a command and its parameters into various lines and make it more readable:
/home/user> ls -ltra \ > file1.txt \ > file2.txt
Recently I used an instruction with a similar format on my terminal window. Since I was going use the same files in various instructions, I decided to highlight\copy the whole command with my mouse and paste them in an open editor.
- I only highlighted with my mouse the two file lines and
- pasted them by mistake into the same terminal window:
/home/user> > /home/user/file1.txt > > /home/user/file2.txt
They system thought I was overwritting the files. The data was lost. Fortunately, there was backup!
Now my question:
Can a terminal session be re-configured so it uses a symbol, other than the > sign, at the start of a split command? Something which won't have such horrendous consequences.
/home/user> ls -ltra \ # file1.txt \ # file2.txt
I am using Korn shell (/usr/bin/ksh) on a Solaris server. Korn is the company's default shell.