I have a directoryOne folder which has several files:
solution/directoryOne/
- 100test.txt
- 101test.txt
- 102test.txt
- 103test.txt
- 104test.txt
solution/directoryTwo/
I'm trying to use a shell script to copy all the files except 104test.text from directoryOne to directoryTwo.
#!/bin/bash
cp directoryOne/!(104*) solution/directoryTwo/
It didn't work out. Is there any way we can use some kind of expression to achieve this?