All Questions
8
questions
1
vote
1
answer
616
views
problem escaping quotes in script
I'm constructing a command line for use with the 'mogrify' tool [part of imagemagick]. the finalised command line looks something like this :
mogrify -stroke yellow -draw 'line 0,0 0,319' -draw 'line ...
3
votes
1
answer
1k
views
Escaping problem with find command
I need to find everything in a directory, excluding certain subdirectories and files. My script needs to call this as a function:
function findStuff() {
# define exclusions
ignore_dirs=("$1" "*...
2
votes
3
answers
10k
views
bash escaping quotes
I have an interesting challenge for how to escape quotes in a bash script.
My bash script has a long curl call with a large -d json structure passed.
#!/bin/bash
Value4Variable=Value4
curl -s -X ...
5
votes
1
answer
46k
views
passing string containing spaces as command-line argument from within script
I'm using a bash shell on mac.
I want to write a shell script 'gac' such that running
> gac one two three
produces exactly the same effect as running
> git add .
> git commit -m "one two ...
1
vote
2
answers
239
views
how to properly schedule a task that schedules a task with 'at' (atd) ? or how to properly quote/escape in bash
I am looking for a way to create a command line using 'at' (atd) to schedule a task, that schedules a task to do "more stuff" after a reboot (one time task).
What I am looking for right now is a way ...
0
votes
3
answers
915
views
backup script to copy files by its extension
I have created script to copy .png files from one directory to another. Script is as follows:
i="`cat /usr/local/app1/default.conf | grep -i values | sed -e 's/\values=//g' -e 's/,/ /g'`"
for data ...
12
votes
2
answers
34k
views
Trouble in script with spaces in filename
I've got a script that scp's a file from remote host back to local. Sometimes the file names contain spaces. scp does not like spaces in its file names. For some reason my attempts at handling the ...
131
votes
3
answers
97k
views
What does it mean to have a $"dollarsign-prefixed string" in a script?
I just saw this in an init script:
echo $"Stopping Apache"
What is that dollar-sign for?
My research so far:
I found this in the bash manual:
extquote
If set, $'string' and $"string&...