Sponsored Content
Top Forums Shell Programming and Scripting Specified substitution not valid for Post 302378896 by klaasjan on Wednesday 9th of December 2009 04:42:55 AM
Old 12-09-2009
Specified substitution not valid for

Experts,

In a script i get the following error:

The specified substitution is not valid for this command

Do you have any idea what is wrong with it?

Code:
TITLE="Code Checker" # Script Titel #
EXT="_UA99" # Eind van dirnaam #
FILE="job.dat" # Zoekbestandsnaam #
SEARCH="returncode 0" # Zoektekst #
DATUM=`date +%Y%m%d`
GEMEENTE="gemeentenaam"
GEMEENTECODE="1111"
DIR="/oradb/$GEMEENTE/pdds$GEMEENTECODE/voa/prog/data/"

.....
.....
.....

# Check of Dir bestaat
cd $DIR$DATUM*$EXT >/dev/null # this line gives the error
if ! [ "$?" = "0" ]
then echo "Unknown Directory '$DATUM......$EXT'" >> /tmp/checkfile_text.txt
stuurmail ERROR
cleanexit
fi

I hope you can help me,

With kindly regards

Klaasjan Boven
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Is this a valid statement?

I need an if statement that recognizes whether files fitting a certain pattern exist in the current directory. Is this syntax valid: if ; then ... fi assuming that zero="0" and star="*". Is there a better way to write it? (3 Replies)
Discussion started by: mharley
3 Replies

2. Solaris

Are my computer valid for Solaris

hello It's my first post in your forum I have a Pentium 4 processor and Motherboard Gigabyte with Intel chipset and 80 GB hard disk .My question is : Are my computer valid for Solaris os ??? Are the Solaris is free like Fedora and Suse ?? (sorry for my bad English because I'm not English man) (3 Replies)
Discussion started by: engshaheen
3 Replies

3. Programming

valid code?

hey , everyone. I have a few questions about pieces of code and was wondering if someone could tell me what exactly they did or if they are even valid. bool1 && bool2 || bool3 <---in what order do these get processed? if (! isdigit(c)) <---What does this do? i = j % 3; <---what does this do?... (4 Replies)
Discussion started by: bebop1111116
4 Replies

4. Shell Programming and Scripting

': not a valid identifier

I am trying to write a bash script. I am able to do simple things like pass arguments, assign variables and echo the results. However, when I try to declare and array or anything a little more complicated I get ': not a valid identifier Here is my code so far: #!/bin/bash echo start t... (7 Replies)
Discussion started by: script123
7 Replies

5. Programming

is it valid output ?

#include <iostream> #include<stdio.h> using namespace std; class a { public: int xx; a() { cout << "in CONS a \n"; } ~a() { cout << "in DES a \n"; } }; (1 Reply)
Discussion started by: crackthehit007
1 Replies

6. Homework & Coursework Questions

Valid Name

Could someone help me by midnight tonight!!! Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Insert a reference to the Bourne shell as the command... (0 Replies)
Discussion started by: cody007
0 Replies

7. UNIX for Dummies Questions & Answers

Testing for valid DC's?

Ok so this is sort of a unix question. I am frequently logging into customers boxes and our product integrates with Active directory. I deal with a great deal of people who have no business being admins but are and they don't know squat about their network or their DC's. So a recurring problem... (4 Replies)
Discussion started by: MrEddy
4 Replies

8. Shell Programming and Scripting

how to check for valid password

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

9. Shell Programming and Scripting

Check for valid hostnames

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
Inline::Files::Virtual(3)				User Contributed Perl Documentation				 Inline::Files::Virtual(3)

NAME
Inline::Files::Virtual - Multiple virtual files in a single file VERSION
This document describes version 0.53 of Inline::Files::Virtual, released May 25, 2001. SYNOPSIS
use Inline::Files::Virtual; # Load actual file, extracting virtual files that start with "^<VF> " @virtual_filenames = vf_load($actual_file, "^<VF> "); # Open one of the virtual files for reading open(FILE, $virtual_filenames[0]) or die; print while <FILE>; close(FILE); # Open one of the virtual files for appending open(FILE, ">> $virtual_filenames[1]") or die; print FILE "extra text"; printf FILE "%6.2", $number; close(FILE); # Actual file will be updated at this point WARNING
This module is still experimental. Careless use of it will almost certainly cause the source code in files that use it to be overwritten. You are strongly advised to use the Inline::Files module instead. If you chose to use this module anyway, you thereby agree that the authors will b<under no circumstances> be responsible for any loss of data, code, time, money, or limbs, or for any other disadvantage incurred as a result of using Inline::Files. DESCRIPTION
This module allows you to treat a single disk file as a collection of virtual files, which may then be individually opened for reading or writing. Virtual files which have been modified are written back to their actual disk at the end of the program's execution (or earlier if the "vf_save" subroutine is explicitly called). Each such virtual file is introduced by a start-of-virtual-file marker (SOVFM). This may be any sequence (or pattern) of characters that marks the beginning of the content of a virtual file. For example, the string "--" might be used: -- Contents of virtual file number 1 -- Contents of virtual file number 2 -- Contents of virtual file number 3 or the pattern "/##### w+ #####/": ##### VF1 ##### Contents of virtual file number 1 ##### VF2 ##### Contents of virtual file number 2 ##### VF3 ##### Contents of virtual file number 3 Note that the SOVFM is not considered to be part of the file contents. Interface The module exports the following methods: "vf_load $file, $SOVFM_pattern" This subroutine is called to load an actual disk file containing one or more virtual files. The first argument specifies the name of the file to be loaded as a string. The second argument specifies a pattern (as either a string or "qr" regex) that matches each start- of-virtual-file marker within the file. For example, if the file "/usr/local/details.dat" contains: =info names Damian Nathan Mephistopheles =info numbers 555-1212 555-6874 555-3452 =info comment Mad Bad Dangerous to know then you could load it as three virtual files with: @virtual_filenames = vf_load("/usr/local/details.dat", qr/^=infos+S+s*? /); Note that, because the actual file is decomposed into virtual files using a "split", it is vital that the pattern does not contain any capturing parentheses. On success, "vf_load" returns a list of virtual filenames for the virtual files. Each virtual filename consists of the actual name of the file containing the virtual file, concatenated with the offset of the virtual file's SOVFM within the actual file. For example, the above call to "vf_load" would return three virtual filenames: /usr/local/details.dat(00000000000000000000) /usr/local/details.dat(00000000000000000048) /usr/local/details.dat(00000000000000000097) When any of these virtual filenames is subsequently used in an "open", the corresponding virtual file is opened. "vf_save @actual_filenames" "vf_save" This subroutine causes the virtual files belonging to the nominated actual file (or files) to be written back to disk. If "vf_save" is called without arguments, then all currently loaded virtual files are saved to their respective actual files at that point. "vf_save" is automatically called in an "END" block at the termination of any program using the module. "vf_marker $virtual_filename" This subroutine returns the SOVFM that preceded the nominated virtual file. The module also modifies the "open", "close", "print", "printf", "read", "getline", "getc", "seek", "tell", and "truncate" built-in functions so that they operate correctly on virtual files. As a special case, it is also possible to use the raw SOVFM as a virtual file name: use Inline::Files::Virtual; vf_load $filename, qr/__[A-Z]+__/; open FILE, "__MARKER__"; # and in the file that was vf_load-ed __MARKER__ file contents here However, this always opens the very first virtual file with that SOVFM, no matter how often it is called, or how many such markers appear in the file. Handling "implicit" virtual start-of-virtual-file markers Sometimes an SOVFM is "implicit". That is, rather thanb being a separate marker for the start of a virtual file, it is the first part of the actual data of the virtual file. For example, consider the following XML file: <DATA> <DESC>This is data set 1</DESC> <DATUM/>datum 1 <DATUM/>datum 2 <DATUM/>datum 3 </DATA> <DATA> <DESC>This is data set 2</DESC> <DATUM/>datum 4 <DATUM/>datum 5 <DATUM/>datum 6 </DATA> Each of the "<DATA>...</DATA>" blocks could be treated as a separate virtual file by specifying: @datasets = vf_load("data.xml", '<DATA>'); But this would cause the individual virtual files to contain invalid XML, such as: <DESC>This is data set 1</DESC> <DATUM/>datum 1 <DATUM/>datum 2 <DATUM/>datum 3 </DATA> One can indicate that the nominated SOVFMs are also part of the virtual files' contents, by specifying the markers as a look-ahead pattern: @datasets = vf_load("data.xml", '(?=<DATA>)'); This causes "vf_load" to identify the sequence "<DATA>" as a start-of-virtual-file marker but not consume it, thereby leaving it as the initial sequence of the virtual file's content. DIAGNOSTICS
"Could not vf_load '%s'" The module could not open the specified disk file and read it in as a set of virtual files. "Unable to complete vf_save" The module could not open the specified disk file and write it out as a set of virtual files. A preceding warning may indicate which virtual file caused the problem. "Virtual file not open for input" An attempt was made to "getline", "getc", or "read" a virtual file that was opened for output only. (Warning only) "Virtual file not open for output" An attempt was made to "print" or "printf" a virtual file that was opened for input only. (Warning only) AUTHOR
Damian Conway (damian@conway.org) EVIL GENIUS WHO MADE HIM DO IT
Brian Ingerson (INGY@cpan.org) COPYRIGHT
Copyright (c) 2001. Damian Conway. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.16.3 2011-01-31 Inline::Files::Virtual(3)
All times are GMT -4. The time now is 04:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy