CAT file then to CPIO using Korn Shell
I am messing with a backup script that I have and ran into issue. In this case I want to extract the directories and files that I want to backup from a file. I have a file named: include_dirs which includes a short list of files and directories for testing.
include_dirs: Code:
Code:
dirs=include_dirs # the files and directories I want to back up Code:
ksh -x ./test_backup full Code:
dirs=include_dirs # the files and directories I want to back up |
'find $(cat include_dirs) -type f | cpio --whatever-args'?
|
Thanks
Is the whole line enclosed in single quotes '' Code:
'find $(cat include_dirs) -type f | cpio --whatever-args' |
Quote:
Code:
find $(cat include_dirs) -type f | cpio --whatever-args |
thanks,
the interesting part is that everything works find from the cli and not in the script so if I do this the commands work: Code:
Code:
#!/bin/ksh Code:
#!/bin/ksh regards |
It looks like I had an id10t error. I needed the exit.
Code:
#!/bin/ksh |
Quote:
Code:
#!/bin/ksh |
Many thanks
I will create a new post with my next questions on detecting whitespaces Regards |
All times are GMT -5. The time now is 05:58 AM. |