Java String Substritute substituteJobID(String path)

Here you can find the source of substituteJobID(String path)

Description

substitute Job ID

License

Apache License

Declaration

public static String substituteJobID(String path) 

Method Source Code

//package com.java2s;
/*/*from  www. j ava 2  s. co m*/
 * Copyright 2013 Netherlands eScience Center
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

public class Main {
    public static String substituteJobID(String path) {

        if (path == null) {
            return null;
        }

        return path.replace("%j", "$PBS_JOBID");
    }
}

Related

  1. substituteBlanks(String s, String subst)
  2. substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name, String display1, String display2)
  3. substituteEnvironmentVariables(String str, String prefix, String suffix)
  4. substituteHex(String aString)
  5. substituteInvalidChars(String str)
  6. substituteMarkers(String sql, String marker, Object substitution)
  7. substituteNull(String value, String substitution)
  8. substitutePropertyWithIn(String propertyName, String replacementString, String evaluatedString)
  9. substituteSelectedCharacters(String text, boolean skip)