I'm afraid you refuse to face the evidence so I'm giving up trying to help you understanding where your reasoning fails and why this isn't academic.
There are people that are grateful they are teach something and other people that can't accept being wrong. Looks like you want to be in the second category.
It reminds me those people claiming landing on the moon was faked. I never waste my time discussing with them.
When I come across it again I'll gather evidence and re-post. If you manage to prove that no version of unix or Linux ever exhibits this anomolous behaviour, please re-post.
This has been entertaining if nothing else and I bookmarked some useful reference works along the way (many not posted in this thread).
I even fished some of my archive unix manuals out of storage where I could not find a copy on the Internet. I also re-visited the "find ... -exec" version which crashes unix to find out when they changed the implementation.
I haven't worked on every version of unix but I have worked on rather too many unix variants to believe in standard behaviour!
If you manage to prove that no version of unix or Linux ever exhibits this anomolous behaviour, please re-post.
I already demonstrated it many times.
It is impossible for a command (find) to process something differently (the file names with embedded spaces) depending on something (the quotes) there is no way for the command to know about (because the quotes have been stripped by the shell before passing the curly braces argument to the command to be run later).
I hope I'm not missing something already cleared/explained, but, as far as the filenames with embedded IFS characters are concerned (a space in the example below), and as already mentioned (see note for embedded {} usages before in the thread), a {} quoting might be needed, depending on the syntax used:
(Okay I know I signed off from this thread). Interesting radoulov. Looks different from issues with say renaming files using embedded {} syntax where this syntax is valid: "find .... -exec mv {} {}.txt".
radoulov: the syntax you use in your first examples is a different case than the one this thread is about. (Glad to agree with Methyl on this )
It also breaks the standard a couple of times so is in the undefined behavior area. i.e. it might work or not depending on the find implementation.
POSIX states:
- the path must not be empty
- the curly braces must appear alone to be processed
It will work in a Gnuish environment but with a POSIX compliant shell and find you might get the following:
The last example is a portable way to achieve the same, although the inline trick might be puzzling and is unnecessary:
---------- Post updated at 11:57 ---------- Previous update was at 11:51 ----------
Quote:
Originally Posted by methyl
renaming files using embedded {} syntax where this syntax is valid: "find .... -exec mv {} {}.txt".
Too bad this syntax breaks POSIX twice too:
- if {} appear more than once, behavior is unspecified
- it is processed if passed as a two characters argument
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi
I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message
No utpmx entry: you must exec "login" from lowest level "shell" :confused:
What i want is: open various... (0 Replies)