01-04-2009
Quote:
Originally Posted by
arukr
Script on execution should take a directory path from user and a numeric input.
Where does it get the numeric input? From the user? From the standard input? From a file?
Quote:
it should flag in case of input missing or wrong path .
How do you determine whether the path is right or wrong?
What do you mean by "flag"? Should the script exit or should it continue? Should it notify the user?
Quote:
All files inside directory greater than a the numeric input specified
How do you determine whether a file is "greater than the numeric input"? Are the file names all numeric? Or do you want to test the contents of the files?
Quote:
should be copied to another directory temp .At last the total copied file size in temp should be displayed .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help..
thanks in adv.
Br///
Vijay. (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies
2. Shell Programming and Scripting
Please help, I want script to check filename, size and date in specify path.
I want output as:
DATE: YYYYMMDD HH:MM
------------------------------------------------
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd HH:MM
fileA,filesize,yyyy mm dd... (1 Reply)
Discussion started by: akeji
1 Replies
3. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
The script usage will be as follows:
library.third source_directory
- Your script will display an appropriate error message and exit with status 3 if no parameters are given
- Your script will display an appropriate error... (2 Replies)
Discussion started by: netmaster
2 Replies
4. Shell Programming and Scripting
I need to check if an account has a valid password.
Would something like this work?
read ACCNAME
if grep -q "^$ACCNAME:\$6:" /etc/shadow; thenI noticed every entry in my shadow file that has a password starts with $6 ... it works for my current setup, but would it always work? I can't test... (4 Replies)
Discussion started by: ADay2Long
4 Replies
5. Shell Programming and Scripting
Hello,
Trying to iterate over set of file in current directory and check if the file name in that folder matches certain string. This is what I have so far. Here I am checking if the file name starts with nexus, if so echo file name to log file.
Getting weird syntax errors. Any help is... (7 Replies)
Discussion started by: scorpioraghu
7 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement:
assume my file has content:
hello= gsdgsd sfdsg sgdsg sgdgdg
world= gggg hhhh iiiii
xxxx= pppp ppppp pppp
my... (5 Replies)
Discussion started by: rtagarra
5 Replies
7. Windows & DOS: Issues & Discussions
Well since Windows always laments over some of my files having a too long "path+filename" and it gets in the way of copying complete directory structures I would love to have a DOS Script that helps me with finding those.
I already tried DCSoft Long Filename Finder but that is neither DOS based... (3 Replies)
Discussion started by: pasc
3 Replies
8. Shell Programming and Scripting
Hi all,
I have date and time value in a string,
I want to check if it is a valid date and time.
Need help on this.
Thanks (7 Replies)
Discussion started by: Pratiksha Mehra
7 Replies
9. Shell Programming and Scripting
How can I validate if time (HH:MM:SS) argument is valid? I got this from web but I can't modify it to exit the script if the time argument is invalid.
echo $1 | awk -F ':' '{ print ($1 <= 23 && $2 <= 59 && $3 <= 59) ? "good" : "bad" }'
ex:
./script.ksh 12:34:21 = okay
./script.ksh... (10 Replies)
Discussion started by: erin00
10 Replies
10. Shell Programming and Scripting
Hello,
I am trying to develop a script to check for valid hostnames. Below are the prerequisites for a valid hostname which I got from wiki :
Hostnames are composed of series of labels concatenated with dots, as are all domain names. For example, "en.wikipedia.org" is a hostname. Each label... (8 Replies)
Discussion started by: rahul2662
8 Replies
LEARN ABOUT DEBIAN
xupdate
XUPDATE(1p) User Contributed Perl Documentation XUPDATE(1p)
NAME
xupdate - Process XUpdate commands over an XML document
SYNOPSIS
xupdate [options] <xupdate-file> <input-file>
Options:
-u | --usage print brief help on usage
-h | --help print documentation
-n | --namespace prefix=namespace-uri
associate a namespace with a prefix for use
in XPath selections in XUpdate file
(this option may occur several times)
-k | --keep-ws preserve whitespace in the XUpdate file
-s | --strip-ws strip ignorable whitespace from the input file
-V | --version print current version and revision
-i | --indent indent the output XML
-j | --extra-indent like -i, but also adds a leading and a trailing
linebreak to every text node.
but also put an extra newline after
every start-tag and before every end-tag
OPTIONS
--usage Print a brief help message on usage and exits.
--help Prints the manual page and exits.
--namespace prefix=namespace-uri
Associate a namespace with a prefix. The prefix may be used in the XPath selections in the XUpdate file to address nodes of the
source document that belong to the given namespace. This is especially useful for mapping the default namespace to a prefix
because XPath by definition doesn't honour default namespaces. This option may occur several times.
--keep-ws
Preserves any whitespace in XUpdate file. The default behaviour is to remove all ignorable whitespace and any leading or trailing
whitespace in all XUpdate command elements in the XUpdate file.
--strip-ws
Remove "ignorable" whitespace from the input file. The default behaviour is to keep any whitespace unless the --extra-indent (-j)
option is used. Note that the whitespace being present or not may affect results returned by some XPath expressions (such as
/foo/bar/text()[2]).
--version
Print version and revision number of This program command and version number of XML::XUpdate library used.
--indent
Indent the resulting document on output.
--extra-indent
Indent the resulting document on output as --indent, but also add a leading and a trailing linebreak to every text node.
--debug Print some debugging information about commands being applied.
DESCRIPTION
This program will parse the given XUpdate file and the input file and print the input file updated accordingly. XUpdate file format is
described in XUpdate Working Draft from 2000-09-14 (http://www.xmldb.org/xupdate/xupdate-wd.html).
AUTHOR
Petr Pajas, pajas@matfyz.cz
COPYRIGHT
Copyright 2002-2003 Petr Pajas, All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2011-08-02 XUPDATE(1p)