09-01-2009
As I wrote, I have no problem accepting my opinion being challenged and I would be surprised but grateful to anyone proving I'm wrong in that case.
However, there is currently absolutely no evidence anyone, including the open poster, is experiencing a different find(1) behavior than the only one that I consider technically possible.
The OP didn't run the simple script I suggested him to do to figure it out. I tested the very same OS the OP is using, Ubuntu, and the quotes weren't required. You failed to cite an OS where quote are required when the path contains spaces and one you tested didn't behave the way you were expecting.
I have thus no reason to change my mind about what I still consider a urban legend.
To clarify, I'm not against the idea some exotic shell implementation might require quoting the curly braces. I'm just telling neither files having embedded spaces nor the find command implementation play any role in that hypothetical requirement.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: peterpan
0 Replies
2. UNIX for Dummies Questions & Answers
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)
Discussion started by: Lokesha
4 Replies
3. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
4. Shell Programming and Scripting
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)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
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)
Discussion started by: nightwatchrenba
10 Replies
6. UNIX for Dummies Questions & Answers
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)
Discussion started by: asjaiswal
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: wolfv
3 Replies
8. Shell Programming and Scripting
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)
Discussion started by: jcdole
1 Replies
9. AIX
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)
Discussion started by: penchev
3 Replies
NASH(8) System Manager's Manual NASH(8)
NAME
nash - script interpretor to interpret linuxrc images
SYNOPSIS
nash [--quiet] [--force] script
DESCRIPTION
nash is a very simple script interpretor designed to be as small as possible. It is primarily designed to run simple linuxrc scripts on an
initrd image. Arguments to commands may be enclosed in either single or double quotes to allow spaces to be included in the arguments. Spa-
ces outside of quotations always delineate arguments, and so backslash escaping is supported.
Additionally, if nash is invoked as modprobe, it will immediately exit with a return code of zero. This is to allow initrd's to prevent
some extraneous kernel error messages during startup.
There are two types of commands, built in and external. External commands are run from the filesystem via execve(). If commands names are
given without a path, nash will search it's builtin PATH, which is /usr/bin, /bin, /sbin, /usr/sbin.
Currently, nash supports the following built in commands.
access -[r][w][x][f] path
Tells whether the current user has sufficient permissions to read, write, or execture path, or if the file exists (see access(2) for
more information).
echo [item]* [> filename]
Echos the text strings given to a file, with a space in between each item. The output may be optionally redirected to a file.
exec <command> The command given is execed, overlaying the nash process.
find dir -name name
Display the path to files named name in or below directory dir. This is a very limited implementation of find(1).
findlodev
Prints the full path to the first unused loopback block device on the system. If none is available, no output is displayed.
losetup /dev/loopdev file
Binds file to the loopback device /dev/loopdev. See losetup(8) for information on loopback devices.
mkdevices path
Creates device files for all of the block devices listed in /proc/partitions in the directory specfied by path.
mkdir [-p] path
Creates the directory path. If -p is specified, this command will not complain if the directory exists. Note this is a subset of the
standard mkdir -p behavior.
mknod path [c|b] major minor
Creates a device inode for path. This is identical to mkdev(1) which the exceptions that it will not create named pipes and if the
directories in path do not exist they will be automatically created.
mkrootdev path
Makes path a block inode for the device which should be mounted as root. To determine this device nash uses the device suggested by
the root= kernel command line argument (if root=LABEL is used devices are probed to find one with that label). If no root= argument
is available, /proc/sys/kernel/real-root-dev provides the device number.
mount [--ro] -o opts -t type device mntpoint
Mounts a filesystem. It does not support NFS, and it must be used in the form given above (arguments must go first). If device is
of the form LABEL=foo the devices listed in /fB/proc/partitions will be searched, and the first device with a volume label of foo
will be mounted. Normal mount(2) options are supported, and --ro will mount the filesystem read only for compatibility with older
versions of nash. The defaults mount option is silently ignored.
pivot_root newrootpath oldrootpath
Makes the filesystem mounted at newrootpath the new root filesystem, and mounts the current root filesystem as oldrootpath.
raidautorun mddevice
Runs raid autodetection on all raid-typed partitions. mddevice must be a raid device (any will do).
showlabels
Display a table of devices, their filesystem labels, and their uuids.
umount path
Unmounts the filesystem mounted at path.
RETURN VALUE
Returns 0 is the last command succeeded or 1 if it failed.
OPTIONS
--force
Allows force really execute the script, even though nash doesn't appear to be running from an initrd image.
BUGS
Probably many. nash is not a shell, and it shouldn't be thought of as one. It isn't entirely different from a shell, but that's mostly by
accident.
AUTHOR
Erik Troan <ewt@redhat.com>
4th Berkeley Distribution Sat Mar 27 1999 NASH(8)