bash-3.2$ FILENAME=somefile.tar.gz //指定黨名
bash
-3.2$ echo ${FILENAME%%.*} //設定抓取檔名(%%. 指:用.為分段來截斷最長的字串)
somefile
bash
-3.2$ echo ${FILENAME%.*} //設定抓取副檔名(%.指:用.為分段來截斷最短的字串)
somefile.tar

rangerll 發表在 痞客邦 留言(0) 人氣()


委託單種類委託單接收時間盤前(8:30-8:45)盤中交易時間(8:45-13:45)撮合方式集合競價逐筆撮合委託單種類市價單限價單市價單限價單委託條件FOKIOCFOKIOCRODFOKIOCFOKIOCROD期貨單式委託 O OOOOOOO跨月價差
委託     OOOOO選擇權單式委託 O OOOOOOO組合式委託     OOOO 

rangerll 發表在 痞客邦 留言(0) 人氣()


寫SHELL要用報刪除空白的指令:
參考以下網頁:https://www.cyberciti.biz/tips/delete-leading-spaces-from-front-of-each-word.html
 

rangerll 發表在 痞客邦 留言(0) 人氣()


確認crontab 有帶起程式過,但是執行程式失敗。
將錯誤訊息導出,查看錯誤內容。
01 15 * * * /u1/ftpu/sh/runftpu U  1>/u1/ftpu/log1.txt 2>/u1/ftpu/log2.txt
查看

rangerll 發表在 痞客邦 留言(0) 人氣()


//---------------
DlgKeyinOrd.cpp
//--------------------
/////////

rangerll 發表在 痞客邦 留言(0) 人氣()


cat a.out | mail -s "主旨"  rangerll684@mymail.com
 

rangerll 發表在 痞客邦 留言(0) 人氣()


兩個struct交互使用的宣告問題
(1)先宣告 struct 名稱
(2) 再定義 struct內容
#include
//using namespace std;
struct tag_a; /* ............incomplete declaration. */
struct tag_b;
typedef struct tag_a A;
typedef struct tag_b B;
struct tag_a{
struct tag_b *bp; /* ..struct tag_b .............. */
int value;
};
struct tag_b{
struct tag_a *ap;
int value;
};
struct evp_cipher_st;
struct evp_cipher_ctx_st;
//. ossl_type.h
typedef struct evp_cipher_st EVP_CIPHER;
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
//------------------------------------
//.evp.h
struct evp_cipher_st
{
int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
//...a
//const EVP_CIPHER_CTX *ctx;
};
struct evp_cipher_ctx_st
{
const EVP_CIPHER *cipher;
//...
};
int main(){
return 0;
}

rangerll 發表在 痞客邦 留言(0) 人氣()


最近想開發thread的程式:
參考神人的程式:https://www.binarytides.com/server-client-example-c-sockets-linux/
自己實作如下:
++++++++++++++++++++

rangerll 發表在 痞客邦 留言(0) 人氣()


我需要判定資料夾下面是否有檔案存在的程式:
來看看神人寫的程式
也可以參考:https://linux.die.net/man/3/readdir
++++++++++++++++++++++++++++++++++++++++++<( ̄︶ ̄)>

rangerll 發表在 痞客邦 留言(0) 人氣()


一般河內塔的作業模式: 
 
 

rangerll 發表在 痞客邦 留言(0) 人氣()


抓取執行指令的資料夾
-----------------------------------------------------------
if [ -L $0 ] ; then
    DIR=$(dirname $(readlink -f $0)) ;

rangerll 發表在 痞客邦 留言(0) 人氣()


請設計一個程式,輸入N個正整數,然後輸出一個三角形陣列,其中相鄰兩元素之差取其絕對值至於所對英兩元素之上面。例如89781213,輸出結果如下:
    10
   55  65

rangerll 發表在 痞客邦 留言(0) 人氣()

1 2 3
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。