Sponsored Content
Full Discussion: Date validity check
Top Forums Shell Programming and Scripting Date validity check Post 302873541 by rbatte1 on Tuesday 12th of November 2013 10:42:56 AM
Old 11-12-2013
Putting code or output into CODE tags makes it a lot more readable. Can you edit your post to put them in please.

You also seem to be persisting with your original costly code which fires up all sorts of processes (cut, cat, sort, etc.). Can you show me the errors you are getting with my offering or why it is unacceptable. I can then try to help.

Reading the unformatted block of text, you seem to like my grep so I'd like to know how I can improve the rest.




Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Validity

Hey, I was wondering how I could write a bash script which accepts: cat <<% | bash ./results06 ---------------------------------------------------------- Exam Results 2006 ---------------------------------------------------------- ... (1 Reply)
Discussion started by: Xerobeat
1 Replies

2. Shell Programming and Scripting

checking for command output validity

hi, i'm trying to write a script to check if the home directories of users are set correctly. below is an extract of the script here, i am trying to put the name of the owner of the home directory into the variable dirperm (by reading lines in /etc/passwd). however, it seems that when the... (1 Reply)
Discussion started by: roddo90
1 Replies

3. Shell Programming and Scripting

How to check date variable according to the current date?

Hi folks, I need to write a script that should activate a process according to the current hour. The process should be activatet only if the hour is between midnight (00:00) and 07:00. How should I create the condition? Thanks in advance, Nir (2 Replies)
Discussion started by: nir_s
2 Replies

4. Shell Programming and Scripting

Check for date

How to validate the first line from 1-8 position of audit file that contains the script run date... script could run in random dates. head -1 file1 20090516 100034837SHDHSHE (9 Replies)
Discussion started by: ford2020
9 Replies

5. Shell Programming and Scripting

Script to check the validity of password

Hi, I have to validate the passwords for 100s of unix users across several servers. I have the list of unix users and servers with passwrods. How can I check whether a password is correct or not using a single shell script? Note : I do not have root privileges on any server. All the... (1 Reply)
Discussion started by: Pupil
1 Replies

6. Shell Programming and Scripting

finding date numeral from file and check the validity of date format

hi there I have file names in different format as below triss_20111117_fxcb.csv triss_fxcb_20111117.csv xpnl_hypo_reu_miplvdone_11172011.csv xpnl_hypo_reu_miplvdone_11-17-2011.csv xpnl_hypo_reu_miplvdone_20111117.csv xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies

7. Shell Programming and Scripting

Check if a date field has date or timestamp or date&timestamp

Hi, In a field, I should receive the date with time stamp in a particular field. But sometimes the vendor sends just the date or the timestamp or correctl the date&timestamp. I have to figure out the the data is a date or time stamp or date&timestamp. If it is date then append "<space>00:00:00"... (1 Reply)
Discussion started by: machomaddy
1 Replies

8. Shell Programming and Scripting

Perl code to check date and check files in particular dir

Hi Experts, I am checking how to get day in Perl. If it is “Monday” I need to process…below is the pseudo code. Can you please prove the code for below condition. if (today=="Monday" ) { while (current_time LESS THAN 9:01 AM) ... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies

9. Shell Programming and Scripting

Check, if date is not today

hello, in a file exist entries in date format YYYYMMDD. i want to find out, if there are dates, which isn't today's date. file: date example text 20140714 <= not today's date 20140715 <= not today's date 20140716 <= today's date my idea is to use Perderabo's datecalc ... (2 Replies)
Discussion started by: bora99
2 Replies

10. Shell Programming and Scripting

Confirming validity of programming language tools

so i have scripts that get run in ways similar to this: cat script.pl | perl - $1 $2 $3 cat script.rb | ruby - $1 $ 2 $3 my question is, how can i verify that that the "perl" or "ruby" or "python" tool being run on the box is actually a legit tool? meaning, someone may move the tool from... (2 Replies)
Discussion started by: SkySmart
2 Replies
DEBTAGS(1)                                                    General Commands Manual                                                   DEBTAGS(1)

NAME
debtags - Command line interface to access and manipulate Debian Package Tags SYNOPSIS
debtags [options] <command> [options and arguments] DESCRIPTION
debtags manages package tag data in a debian system and performs basic queries on it. debtags can be used to perform basic queries on the Debtags system: the vocabulary can be queried with the tagshow and tagsearch commands; a package tag database can be checked against the vocabulary with the check command; the whole collection can be copied to standard output to be processed with tagcoll or other tools by the cat command; packages can be searched by tags using the grep command. Finally, tags can be listed with tag ls, edited with the tag add and tag rm, and submitted to the Debtags database with submit. The update command can be used to download extra tags as listed in /etc/debtags/sources.list: see the contents of that file for more infor- mation. COMMANDS
debtags accepts a non-switch argument, that indicates what is the operation that should be performed: help [command] With no arguments, print a summary of available commands. If given a command name as argument, print detailed informations about that command. cat output the full package tag database check <file> check that all the tags in the given tagged collection are present in the tag vocabulary. Checks the main database if no file is specified diff or mkpatch [filename] create a tag patch between the current tag database and the tag collection [filename]. Standard input is used if filename is not specified dumpavail [tag expression] output the full package database grep <tag expression> output the lines of the full package tag database that match the given tag expression. A tag expression (given as a single argument) is an arbitrarily complex binary expression of tag names. For example: role::program && ((use::editing || use::viewing) && !works-with::text) search <tag expression> output the names and descriptions of the packages that match the given tag expression show <pkg> show informations about a package, like apt-cache show does, but adding the tag informations from the debtags index submit [patch] upload the given patch file to the central tag repository. If [patch] is omitted, mail the local tag modifications (uses deb- tags-submit-patch) tag {add|rm|ls} <package> [tags...] General manipulation of tags, useful for automation in scripts. It can be used in three ways: tag add <package> <tags...> will add the tags to the given package tag rm <package> <tags...> will remove the tags from the given package tag ls <package> will output the names of the tags of the given package tagcat output the tag vocabulary tagshow show the vocabulary informations about a tag tagsearch <string [string [string ...]]> show a summary of all tags whose data contains the given strings update Collect package tag data from the sources listed in /etc/debtags/sources.list, then regenerate the debtags tag database and main index. It needs to be run as root vocfilter tagfile filter out the tags that are not found in the given vocabulary file OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). Every one of the commands listed above has its own set of options. To keep this manpage readable, all the options are presented together. Please refer to "debtags help command" to see which options are accepted by a given command. Help options: -h, -?, --help print commandline help and exit. --version print the program version and exit. --manpage=[hooks] output the debtags manpage and exit. Other options: -v, --verbose enable verbose output. --debug enable debugging output (including verbose output). Options for command help Options for command cat Options controlling matching of packages: -i, --invert invert the match, selecting non-matching items. Options controlling transformations of tag data on output: --facets output only the names of the facets (mainly used for computing statistics). --names output only the names of the packages. -q, --quiet do not write anything to standard output. Options for command check Options for command diff Options for command dumpavail Options controlling matching of packages: -i, --invert invert the match, selecting non-matching items. Options controlling transformations of package data on output: --names output only the names of the packages. -q, --quiet do not write anything to standard output. --full output the full record of package data. --short output the names of the packages, plus a short description. Options for command grep Options controlling matching of packages: -i, --invert invert the match, selecting non-matching items. Options controlling transformations of tag data on output: --facets output only the names of the facets (mainly used for computing statistics). --names output only the names of the packages. -q, --quiet do not write anything to standard output. Options for command search Options controlling matching of packages: -i, --invert invert the match, selecting non-matching items. Options controlling transformations of package data on output: --names output only the names of the packages. -q, --quiet do not write anything to standard output. --full output the full record of package data. --short output the names of the packages, plus a short description. Options for command show Options for command submit Options for command tag Options for command tagcat Options for command tagshow Options for command tagsearch Options for command update --local do not download files when performing an update. --reindex do not download any file, just do reindexing if needed. Options for command vocfilter --vocabulary=file vocabulary file to use instead of the current debtags vocabulary. EXAMPLES
Here are some example invocations of debtags: # Update the package tag database debtags update # Show apt-cache informations about the mutt package, # adding tag informations debtags show mutt # Search the tag vocabulary for mail-related tags debtags tagsearch mail # Output a list of all packages which can edit raster images, excluding # shared libraries and dummy packages debtags search "use::editing && works-with::image:raster && ! (role::shared-lib || role::dummy)" # Show all mail clients debtags search 'works-with::mail && network::client' # Output the collection of all mail clients, ready to be reprocessed via # tagcoll debtags grep 'works-with::mail && network::client' # Produce an easily navigable hierarchy with the collection data debtags cat | tagcoll hierarchy # Produce a local tag patch debtags cat > work-tags ...edit work-tags... debtags diff work-tags > my-tagpatch # Submit the patch debtags submit my-tagpatch FILES
/var/lib/debtags/vocabulary The normative tag vocabulary /var/lib/debtags/package-tags The system package tags database, only kept as an easily parsable reference. In the same directory there is a the binary index with the same content, used by applications for fast access. /etc/debtags/sources.list The list of sources to build the package tags database from SEE ALSO
tagcoll(1), axi-cache(1), http://wiki.debian.org/Debtags http://debtags.debian.net AUTHOR
debtags is maintained by enrico@enricozini.org. This manpage has been automatically generated by the debtags program. 1.10 June 21, 2012 DEBTAGS(1)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy