Bash script: extract substring from brackets








To extract substring from brackets: Name: [John Simith].




echo $str | cut -d "[" -f2 | cut -d "]" -f1



see also




ZIP64 support on Windows, Linux and Mac OS









  • Windows
    • File explorer on Windows XP: no
    • File explorer on Windows Vista and later: yes
  • Linux:
    • Run zip -v to check
      $ zip -v
      Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
      This is Zip 3.0 (July 5th 2008), by Info-ZIP.
      Currently maintained by E. Gordon.  Please send bug reports to
      the authors using the web page at www.info-zip.org; see README for details.
      
      Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
      as of above date; see http://www.info-zip.org/ for other sites.
      
      Compiled with gcc 5.2.1 20150808 for Unix (Linux ELF).
      
      Zip special compilation options:
       USE_EF_UT_TIME       (store Universal Time)
       BZIP2_SUPPORT        (bzip2 library version 1.0.6, 6-Sept-2010)
           bzip2 code and library copyright (c) Julian R Seward
           (See the bzip2 license for terms of use)
       SYMLINK_SUPPORT      (symbolic links supported)
       LARGE_FILE_SUPPORT   (can read and write large files on file system)
       ZIP64_SUPPORT        (use Zip64 to store large files in archives)
      
  • Mac OS:
    • Run zip -v to check
      $ zip -v
      Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
      This is Zip 3.0 (July 5th 2008), by Info-ZIP.
      Currently maintained by E. Gordon.  Please send bug reports to
      the authors using the web page at www.info-zip.org; see README for details.
      
      Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
      as of above date; see http://www.info-zip.org/ for other sites.
      
      Compiled with gcc 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42) for Unix (Mac OS X) on Aug 17 2018.
      
      Zip special compilation options:
       USE_EF_UT_TIME       (store Universal Time)
       SYMLINK_SUPPORT      (symbolic links supported)
       LARGE_FILE_SUPPORT   (can read and write large files on file system)
       ZIP64_SUPPORT        (use Zip64 to store large files in archives)
      



see also




Find file or directory name in an ANT script.








  1. script for finding file name(fieleNamePrefix) inside the dir
    <fileset dir=”${dirPath}” id= “jarId” >
    <include name= “fieleNamePrefix*.jar” />
    </fileset >
    <property name= “jarName” refid= “jarId” />
    
  2. script for finding folder name(folderNamePrefix) inside the dir
    <dirset dir=”${dirPath}” id=”dirId”>
    <include name=”folderNamePrefix*”/>
    </dirset>
    <property name= “dirName” refid= “dirId” />