All Questions
12
questions
1
vote
1
answer
202
views
Tab character in exiftool
I need to insert tab character on place of _ between day and hour.
exiftool -T -r -filename -CreateDate -d "%Y%"."%m%"."%d_%H%"."%M%"."%S" /Users/***/***/testmapa/mapa2/ > /Users/***/***/testmapa/...
2
votes
2
answers
1k
views
Problem with spaces when used in find command
I'm trying to place a zip file with the content of the directory in each directory that doesn't contain any subdirectory.
The following command works if there's no space in dirnames and/or filenames ...
18
votes
2
answers
106k
views
How to use a special character as a normal one in Unix shells?
Many questions like 'How to type the double-quote char (")?' are being asked, and we don't want to clutter our community with the same answer (Type it as \" if not enclosed in 's, " if enclosed in 's.)...
1
vote
2
answers
2k
views
Shell eating `?` characters
This is such a simple question that I'm sure it's been asked somewhere, but I can't find it. My shell, which I have not intentionally set up to do so, seems to eat any words involving question marks:
...
0
votes
2
answers
3k
views
Define string with the characters *, single quote and $
I create bash scripts which get sourced from another "main" script to set up variables needed by the main script. These variables need to be able to contain any character and not have them ...
4
votes
2
answers
4k
views
Makefile shell ignoring sed regexp end of line
I have a folder for various testing of C code, containing many files named *.c. My aim is to have a Makefile search for any filename ending in .c and add the root of that filename to the targets.
...
1
vote
2
answers
10k
views
Putting a single quote in a filename [duplicate]
We can a make a directory named $"dollars"&<>\dogs if we surround it with single quotes like the following
mkdir '$"dollars"&<>\dogs'
However, what if I want to include a single ...
2
votes
2
answers
1k
views
What other special characters are there?
For filenames, I know that you have to use either a double quotes or a backslash to include a space in your file name.
Like mkdir "I like coffee" is the same as mkdir I\ like\ coffee
Now when you ...
7
votes
1
answer
3k
views
Representing/quoting NUL on the command line
Can \0 be used on the command line?
Background
For testing corner cases in GNU Parallel I was curious whether all characters were correctly quoted on the command line. Most of them are:
perl -e '...
5
votes
3
answers
9k
views
Help Shell script to pass variables to rsync
I'm trying to create a simple wrapper shell script for rsync. When I send file names to my script, rsync can never seem to identify the correct location. The file names have spaces in them. I've tried ...
2
votes
4
answers
13k
views
sh and grep numbers only
I'm facing a problem and trying to find a solution that works in sh.
If I could use bash this code would work:
ls /a|grep ^[0-9]
Unfortunately this is not the case with sh, and yes I need to use sh. ...
10
votes
2
answers
5k
views
Difference between ' and " on command line (bash)? [duplicate]
I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a ...