I've been trying to copy some remote files to localhost using regex expression, but it reads the regex as if it would be a regular string and does not find any files matching that.
Any ideas why?
file-download
#!/bin/bash
scp "student@172.18.186.10:/home/student/download-this/[a-zA-Z0-9]+\.tar\.gz" .
I have also tried copying from localhost to remote device, but still the regex won't work with scp
file-upload
scp "/root/scripts/this[XYZ]_[0-9]{1,5}\.txt" fs@10.11.10.2:/home/fs/upload



Asked by Florin200217
(13 rep)
Jan 8, 2023, 02:57 PM
Last activity: Jan 8, 2023, 08:26 PM
Last activity: Jan 8, 2023, 08:26 PM