OK, this isn't quite a newbie question, but I put it here in case I am missing something simple.
I have passwordless ssh all set up with public keys copied into the authorized_keys files as needed.
I am trying to copy the output of a script to a file on another server using scp. One server is Debian Linux. The other is Solaris.
The problem occurs in both directions.
In my test, the testScript simply echos "hello world" as such:
$ sh testScript
The command I use is:
$ scp <(sh testScript) user@remoteServer:/home/user/file.txt
The error I get is
/dev/fd/63: not a regular file
Why not workie ?!?!?
This works with no problems:
$ cat <(sh testScript)
Some more info: When I redirect the scp output to the cat command using process substitution, it kind of works, but there is an error message that I don't understand:
(the file junk.txt contains the text "junk on SD1")
$ scp user@remoteServer:/home/user/stuff/junk.txt >(cat)
junk.txt 100% 14 0.0KB/s 00:00
junk on SD1
/dev/fd/63: truncate: Invalid argument
How can I get scp to be process-substitution-compatible?