2

I would like to do something like this?

echo "test"  | smbclient //server/share -c "cd /target/location/;put <RESULT_FROM_PIPE> <AS_THIS_FILENAME>"

Any idea?

Babu
  • 4,324
  • 6
  • 41
  • 60

1 Answers1

4

Well finally, this is the solution I found:

echo "test"  | smbclient //server/share -c "cd /target/location/;put - <NEW_THIS_FILENAME>"

The trick is in the dash - which redirects the stdin.

Babu
  • 4,324
  • 6
  • 41
  • 60