This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function find_folder_start_with () { | |
# 検索対象のフォルダのPrefix | |
START_WITH=$1 | |
# 検索対象のフォルダが持つファイル (Optional) | |
SPECIFIC_FILE_NAME=$2 | |
# SPECIFIC_FILEがいずれかのフォルダに存在するか確認 | |
RES=$(find ./$1* -name "$2" 2>/dev/null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# シンボリックリンク名 | |
LATESTLN="latest" | |
# リンクが既にあれば削除 | |
if [ -L ${LATESTLN} ] | |
then | |
rm ${LATESTLN} | |
fi | |
# 数値から始まる物を抽出し,最後の要素を取得する |