Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

A very simple script, demonstrating a way to detect a working directory.

  1. Sometimes we want a script to work according to the current directory. In this case, I show how distinguish between the sub-system and unit level location.

  2. #!/bin/bash

    #detect sub-system or unit work directory
    cmd="pwd | grep m3_testgroup_jobs"
    eval $cmd >> /dev/null
    if [ $? -eq 0 ] ; then
      sub_system_flg="flase"
    else
      sub_system_flg="true"
    fi
    ...
    if [ "$sub_system_flg" = "true" ] ; then

  3. A better way to do it is using string compare:

  4. #!/bin/bash

    p=`pwd`
    q="m3_testgroup_jobs"
    if [ $p == $q ] ; then
      echo ok
    fi


  ...


I would be happy to offer my services. Call ASAP !


Home

A simple script to calculate the percent of failing number of tests from the total and rounding up the results


Download Area






Search This Site


Feedback This Site




new pages on this site