10-10-2007
See the man page for test -- man test
it has all of those -<whatever> tests and tells you their meaning. -f tells you if it is a regular file and exists, for example.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm having some trouble with the syntax in constructing a simple nested 'for' loop.
My code is as follows:
#!/bin/bash
dir1="fred flume haystack"
for dir2 in ${dir1}
do
fred="1 2 3"
flume="a b c"
... (7 Replies)
Discussion started by: Sn33R
7 Replies
2. Shell Programming and Scripting
Please don't laugh or call me a fool...
I'm trying to set up a script that will go through my Music File directory and generate a set of symbolic links in a directory called "What's New". Within that directory there will be a "30 Days", "3 Months", "6 Months" and "A Year" directories. Within... (0 Replies)
Discussion started by: deckard
0 Replies
3. UNIX for Dummies Questions & Answers
Hi all!
I'm really hoping you can help me out here; now i have searched and searched and have at least worked out that you can't have a nested if statement with a 'done' in it (as i have) as you're killing the parent before the child.
So here's what i have, and here's hoping someone can help... (2 Replies)
Discussion started by: dalgibbard
2 Replies
4. Shell Programming and Scripting
Just started learning bash ,and I am confused with sintaksis
line 16: syntax error near unexpected token `else'
thanks
#!/bin/bash
echo -n "Enter: "
read num
if(($(echo ${#num}) == 0 ))
then
echo No arguments passed.Try again
elif
rem=$(echo $num | tr -d )
... (7 Replies)
Discussion started by: lio123
7 Replies
5. UNIX for Dummies Questions & Answers
Here's the input:
alpha, numeric or alphanumeric string ("line 1 string")
numeric string ("line 2 string")
numeric string ("line 3 string")
numeric string ("line 4 string")
...
where
- each numeric string is in a pattern that can be matched with RE but
- there can be any number of... (2 Replies)
Discussion started by: uiop44
2 Replies
6. Shell Programming and Scripting
Hello all,
I am writing up an input file and I was hoping I could get some guidance as to how to best consolidate these 2 awk statements for 1 while loop.
Here's my input file
# cat databases.lst
#NOTE: These entries are delimited by tabs "\t"
#oracleSID name/pass
#
db11 ... (2 Replies)
Discussion started by: Keepcase
2 Replies
7. Shell Programming and Scripting
HI everyone,
I am not able to find error in the script, when i run the script till
line No. 20
i.e, read var4
everything runs fine. After that the script exits out.
#!/bin/bash
echo -e "Want dryrun OR merge: \n "
read var1
if ] ; then
echo -e "\n Please select from the given... (10 Replies)
Discussion started by: rishi.aradhya
10 Replies
8. Shell Programming and Scripting
Hi,
i m trying to create script which logic is like below.
if ; then
x=`cat /tmp/testoutput.log | grep STOP | wc -l`
y=`cat /tmp/testoutput.log | grep RUN | wc -l`
if ; then
echo "process stop"
if ; then
echo "process running "
else
echo "file not found"
fi
----------------... (2 Replies)
Discussion started by: tapia
2 Replies
9. UNIX for Dummies Questions & Answers
I am having a problem with a nested if. I am sure I am overlooking something. I check for the existence of $Pidfl3 and it exists, o this condition I then want to check for the existence of a next file and remove it. The first if is executed, but on the second if I get test: argument expected.
My... (4 Replies)
Discussion started by: Charles Swart
4 Replies
LEARN ABOUT DEBIAN
ptrepack
PTREPACK(1) General Commands Manual PTREPACK(1)
NAME
ptrepack - Copy any PyTables Leaf, Group or complete subtree into another file.
SYNOPSIS
ptrepack -h -v -o -R start,stop,step --non-recursive --dest-title=title --dont-copyuser-attrs --overwrite-nodes --complevel=(0-9) --com-
plib=lib --shuffle=(0|1) --fletcher32=(0|1) --keep-source-filters --upgrade-flavors --dont-regenerate-old-indexes sourcefile:sourcegroup
destfile:destgroup
DESCRIPTION
Copy any Leaf, Group or complete subtree from a PyTables file into another file.
OPTIONS
A summary of options is included below.
-h Prints a help text.
-v Show more information.
-o Overwite destination file.
-R RANGE
Select a RANGE of rows in the form start,stop,step during the copy of all the leaves.
--non-recursive
Do not do a recursive copy. Default is to do it.
--dest-title=title
Title for the new file (if not specified, the source is copied).
--dont-copy-userattrs
Do not copy the user attrs (default is to do it).
--overwrite-nodes
Overwrite destination nodes if they exist. Default is not to overwrite them.
--complevel=(0-9)
Set a compression level (0 for no compression, which is the default).
--complib=lib
Set the compression library to be used during the copy. lib can be set to "zlib", "lzo", "ucl" or "bzip2". Defaults to "zlib".
--shuffle=(0|1)
Activate or not the shuffling filter (default is active if complevel>0).
--fletcher32=(0|1)
Whether to activate or not the fletcher32 filter (not active by default).
--keep-source-filters
Use the original filters in source files. The default is not doing that if any of --complevel, --complib, --shuffle or --fletcher32
option is specified.
--upgrade-flavors
When repacking PyTables 1.x files, the flavor of leaves will be unset. With this, such a leaves will be serialized as objects with
the internal flavor ("numpy" for 2.x series).
--dont-regenerate-old-indexes
Disable regenerating old indexes. The default is to regenerate old indexes as they are found.
SEE ALSO
ptdump(1).
These utilities are documented fully by PyTables user's manual.
AUTHOR
This manual page was written by Francesc Altet <faltet@carabos.com>.
July 7, 2007 PTREPACK(1)