there are no line length limitations to a for loop, which is part of the shell syntax, so the limitations of passing parameters to a subprocess do not apply
Yes - and No: the maximum number of passed arguments will not apply but the maximum line length will. Suppose you have a line like:
and you execute that in a directory with really many files, it will first be expanded by the shell to:
and if the really many filenames make this line too long for the shells input parser to fathom you will be in deep kimchi. I give you that: some shells don't care for system constants like "LINE_MAX", but as far as i know a POSIXly correct utility has only to be able to digest lines up to that length. Above that all bets are off. So, if you want to stay on the safe side you better do not require something that is optional in the standards.
From /usr/include/sys/limits.h on a rather up-to-date AIX 7.1-system:
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 DEBIAN
odmgr
ODMGR(1) Quick Database Manager ODMGR(1)NAME
odmgr - administration utility for QDBM Odeum
SYNOPSIS
odmgr create name
odmgr put [-uri str] [-title str] [-author str] [-date str] [-wmax num] [-keep] name [file]
odmgr out [-id] name expr
odmgr get [-id] [-t|-h] name expr
odmgr search [-max num] [-or] [-idf] [-t|-h|-n] name words...
odmgr list [-t|-h] name
odmgr optimize name
odmgr inform name
odmgr merge name elems...
odmgr remove name
odmgr break [-h|-k|-s] [file]
odmgr version
DESCRIPTION
This manual page documents briefly the odmgr commands.
odmgr is a utility for debugging Odeum and its applications. It features editing and checking of a database. It can be used for full-text
search systems with shell scripts. This command is used in the above format. name specifies a database name. file specifies a file name,
expr specifies the URI or the ID number of a document, words specifies searching words. elems specifies element databases.
OPTIONS
A summary of options is included below. For a complete description, see the file:///usr/share/doc/qdbm-doc/spex.html#odeumcli .
-uri specify the URI of the document explicitly.
-title str
specify the title of the document.
-author str
specify the author of the document.
-date str
specify the modified date of the document.
-wmax num
specify the max number of words to be stored.
-keep the storing mode is not to be overwrite.
-id specify a document not by a URI but by an ID number.
-t output the details of a document in tab separated format.
-h output the details of a document in human-readable format.
-k output keywords of a document.
-s output summary of a document.
-max num
specify the max number of documents of the output.
-or perform OR search, nut AND search.
-idf tune scores with IDF.
-n show ID numbers and scores only.
SEE ALSO qdbm(3), odidx(1), odeum(3). odopen(3).
AUTHOR
QDBM was written by Mikio Hirabayashi <mikio@fallabs.com>.
This manual page was written by Fumitoshi UKAI <ukai@debian.or.jp>, for the Debian project (but may be used by others).
Man Page 2005-05-23 ODMGR(1)