First: `man find` shows there are options for "UNUSUAL FILENAMES" (e.g. filenames with spaces).
Second: using a "for loop" may be dangerous, there can be more results than a Unix line can handle. I would prefer a while loop.
Third: Scrutinizer already mentioned to use the -exec option of the `find` command. To my opinion this is the best method.
The script below was written to select files and convert a particular string to something other and replace that file. However, I came across some issues with filenames that contain spaces, any suggestions to get around this? Any other suggestions that may apply to this code would also be... (5 Replies)
Hi Unix Guru's,
I have encountered a strange problem with doing a restore on a local sunu machine.
We have 2 live system (v880, v450) and 1 test system v440.
All the machines are sun4u and using sun os 8.0
We have 2 backup device. One Bcakup device connected with v880 and another backup... (0 Replies)
Hi,
What's the best way to find all files under a directory - including ones with space - in order to apply a command to each of them. For instance I want get a list of files under a directory and generate a checksum for each file.
Here's the csh script:
#!/bin/csh
set files = `find $1... (5 Replies)
Hi Gurus,
I have a requirement.
cat /usdd/Sample/"NDDF Plus DB"/"NDDF Descriptive and Pricing"/"NDDF BASICS 3.0"/"Pricing"/1.txt |
sed 's/*|*/|/g' |
sed 's/^*//'|
sed 's/^*//;
s/*$//' > temp.txt
In unix prompt the above command is reading the file 1.txt and I am... (1 Reply)
Hi,
I did the following script:
DIR=`pwd`;for i in `find . -name GESTION -type d`;do cd $i/..;setfacl -R -m g:directores:rwx,
GESTION;echo $DIR'/'$i;cd $DIR;done
This code do the following actions:
1. Starting inside a folder, it's searching for any folder called "GESTION"
2. Every time... (3 Replies)
Hi,
I have an issue with switching to other directory through shell script. I have used
cd /Music"
but that doesn't help me. Then I have also tried using
alias proj 'Music'
alias
then I get the error permission denied but i set the chmod 777 Music. I am using cShell for my... (3 Replies)
how can i make find/sed to include directory names with spaces
the command is like this
for i in `find wp-content/themes -type f -print0 | xargs -0 grep -l
-iE 'e'`;do sed -i -e 's/word1/word2/gI' "$i";done
but it skips one directory names with spaces
sed: can't read ./Nova: No such... (5 Replies)
I am writing a shell script to cd to a folder.
folder name is "October Scripts"
I am currently storing the name of folder in a shell variable as so path="October\ Scripts/".
If I do cd $path I receive the error bash: cd: October\: No such file or directory
What am I doing wrong?
Kindly... (3 Replies)
I'm making a shell script to:
-copy directories to a new location
-perform conversions on the files within the copied directories
-move the newly created files to a new directory
Please see my super basic script and notes below... and thank you thank you thank you in advance !!
... (1 Reply)
Discussion started by: kayzee
1 Replies
LEARN ABOUT HPUX
dh_installmanpages
DH_INSTALLMANPAGES(1) Debhelper DH_INSTALLMANPAGES(1)NAME
dh_installmanpages - old-style man page installer (deprecated)
SYNOPSIS
dh_installmanpages [debhelperoptions] [file...]
DESCRIPTION
dh_installmanpages is a debhelper program that is responsible for automatically installing man pages into usr/share/man/ in package build
directories.
This is a DWIM-style program, with an interface unlike the rest of debhelper. It is deprecated, and you are encouraged to use
dh_installman(1) instead.
dh_installmanpages scans the current directory and all subdirectories for filenames that look like man pages. (Note that only real files
are looked at; symlinks are ignored.) It uses file(1) to verify that the files are in the correct format. Then, based on the files'
extensions, it installs them into the correct man directory.
All filenames specified as parameters will be skipped by dh_installmanpages. This is useful if by default it installs some man pages that
you do not want to be installed.
After the man page installation step, dh_installmanpages will check to see if any of the man pages are .so links. If so, it changes them to
symlinks.
OPTIONS
file ...
Do not install these files as man pages, even if they look like valid man pages.
BUGS
dh_installmanpages will install the man pages it finds into all packages you tell it to act on, since it can't tell what package the man
pages belong in. This is almost never what you really want (use -p to work around this, or use the much better dh_installman(1) program
instead).
Files ending in .man will be ignored.
Files specified as parameters that contain spaces in their filenames will not be processed properly.
SEE ALSO debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
11.1.6ubuntu2 2018-05-10 DH_INSTALLMANPAGES(1)