Search results

  1. A

    Script to do cronjob to download latest file and unzip it . SOLVED !

    I did it and it worked using wget with tail -1 | grep -Po 'FN_\d{8}' to get FN_XXXXXXXX Then use this number to download and untar. Thanks
  2. A

    Script to do cronjob to download latest file and unzip it . SOLVED !

    I use to go to a website http://testme.com/direct1/direct2/direct3/direct4/ to see latest file then do wget and untar it . http://testme.com/direct1/direct2/direct3/direct4/FN_XXXXXXXX.0_some_thing.tgz Where XXXXXXXX is number keep increase and I want to get the latest number link to download...
  3. A

    Basic script to get directory name and time.

    Yes that works. This is a good lesson to learn for me. Thanks.
  4. A

    Basic script to get directory name and time.

    I wrote this shell script # !/bin/sh -x DAY=$(date +%m%d%H%M) Location=`pwd | grep -o '[^/]*$' | tr -d '\n'` echo "This is a test $Location and $DAY" > file_$Location_$DAY.log pwd is /home/some/where/in/mydirectory Why I did not see $location in the file name but can see it in the log ? The...
  5. A

    How to get pid openned only ?

    I have a history.log file 2020/06/06 23:59:13 | 437:test pid=020666 opened Boards 0, 1, 2, 3, 4 2020/06/07 00:05:36 | 437:test pid=020666 closed Boards 0, 1, 2, 3, 4 2020/06/09 20:59:13 | 437:test pid=020677 opened Boards 0, 1, 2, 3, 4 2020/06/10 00:05:36 | 437:test pid=020688 opened...
Top