-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script fails on ubuntu sh #45
Comments
I got it. Sed escapes the single quotes well, but the script crashes if it finds a back tick. adding another sed to strip quotes out of the filenames did the job. | grep "^[ch<>.*][f]|deleting" | sed "s:^\S_\s_::" | sed -ne 's/\d96\d39//gp' | sed "s:(.):if [ -f "\1" ]; then cp --parents "\1" $DOT_DIR/backups/$TIMESTAMP; fi:" | sh || die "BACKUP" |
So am I correct in understanding that the issue was caused by back ticks in If that is the case, and you strip them from the filenames, what happens to Nevertheless, if everything else in bitpocket then moves along without On Thu, Jan 30, 2014 at 8:23 PM, rafaelmuylaert notifications@github.comwrote:
|
Looks very nice! On Fri, Jan 31, 2014 at 1:04 AM, rafaelmuylaert notifications@github.comwrote:
|
This can be closed too, right? |
Also Yes :D |
When trying to run the script on a ubuntu box I get the following error:
sh: 27084: Syntax error: "fi" unexpected (expecting "then")
I understand it happens on this line:
apparently sh is not accepting nicely what sed feeds him... I tried to change the code to use
sed "s:(.*):test -f "\1" && cp --parents "\1" $DOT_DIR/backups/$TIMESTAMP:"
but that won't work nicely either...
Anyone has had the same problem?
The text was updated successfully, but these errors were encountered: