×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Bash
Posted by: Gerrit Viljoen
Added: Oct 10, 2014 9:58 AM
Modified: Oct 11, 2014 10:12 AM
Views: 41
Write input to log file, with a timestamp. Rolls log file when it's bigger than 2MB.

echo 'Log this please' | rollog /var/log/test.log
  1. #!/bin/bash
  2.  
  3. #Failfast block
  4. error_handler() {
  5.     echo "Error at line ${1} returned ${2}"
  6. }
  7. trap 'error_handler ${lineNO} $?' ERR
  8. set -o nounset
  9. set -o errexit
  10. set -o pipefail
  11.  
  12. #Check arguments
  13. if [[ -z "$@" ]]
  14. then
  15.     echo 'usage: [output] | rollog [file]'
  16.     exit 1
  17. else
  18.     log_file="$@"
  19.     log_dir=$(dirname "$log_file")
  20.     second_log_file="$log_file.1"
  21. fi
  22.  
  23. #Make sure that the log file exists
  24. if [[ ! -d "$log_dir" ]]
  25. then
  26.     mkdir -p "$log_dir"
  27. fi
  28. touch "$log_file"
  29.  
  30. #Roll log file
  31. log_size=$(stat -c '%s' "$log_file")
  32. log_size_threshold=$((2 * 1024 * 1024)) #2MB
  33. if [[ "$log_size" -gt "$log_size_threshold" ]]
  34. then
  35.     rm -f "$second_log_file"
  36.     mv "$log_file" "$second_log_file"
  37.     touch "$log_file"
  38. fi
  39.  
  40. #Read from std input (line by line) and write to log file
  41. while read line
  42. do
  43.     echo "$(date +'%F %T') - $line" >> "$log_file"
  44. done
  45.  

1 comment

allah showner 3 years ago
Hello all buyer, i’m hacker and i want to sell some stuffs : cc info cvv , Dumps T1&2 + pin , paypal , GCs , Bank login , wu …
Business with me. you have to trust me , that’s for sure
At the moment , I have 150,000 US CVV , World 14,000 CVV, UK 6,000 CVV
CA, AU, INTER , ASIA have about 40,000 CVV ! All fresh and good here !
I can have more than in every week, because alway update !

If you want to have deals with good quality please contact me via


Yahoo messenger : byeripper

email: byeripper@yahoo.fr

Skype id : candy_deal

Gmail : dumpspaul@gmail.com

ICQ : 692450206

Whatsapp : +23756342182



I’m best seller alway sell stuffs fresh valid with hight balance.
Please view list price before you buy it:

* Sell valid CVV fresh, cheap price:

- Usa = 1$/1ccn (cc non cvv2)
– Usa visa.mc = $3/1cvv
– Usa amex.dis = $5/1cvv
– Uk visa.mc = $5/1cvv
– Uk amex.dis = $7/1cvv
– Au visa.mc = $12/1cvv
– Au amex.dis = $15/1cvv
– Ca visa.mc : $7/1cvv
– Ca amex.dis : $10/1cvv
– Eu visa.mc : $15-20/1cvv
– Eu amex.dis : $20-25/1cvv
– Asia = $15/1cvv
– Us with bin = $7/1cvv
– Uk with bin = $10/1cvv
– Uk with dob = $20/1cvv
– Uk with bin + dob = $25/1cvv
– Us fullz = $30/1cvv
– Uk fullz = $35/1cvv
– Eu fullz = $40/1cvv
– other country = ask me for price
=> when you buy bulk . i will sell for you good price

* DO TRANSFER WESTERN UNION:

- I can make ready mtcn numbers to pick up money.
– do Transfer wu . very easy to cashout all country.
$8000 = $2000
$6000 = $1600
$3000 = $850
$1000 = $300
– With do transfer Wu , all infosender and MTCN i will send for you ,
U can pick up at all shop WU in your country
– Within 15mins have MTCN and done

* DUMPS:

- TRack 1&2 [101],[201] USA – United State !

+ Classic/Standard = 35$ per 1
+ Gold/Premium = 50$ per 1
+ Platinum = 50$ per 1

- Track 1&2 [101],[201] EU (Sell random – Who have bank can ask me to find)

+ CLassic/Standard = 50$ per 1
+ Gold/Premium = 100$ per 1

All DUMPS Track 1&2 [101],[201] high Valid rate more than 90% !

- Have Bank Login : Chase Bank (US), BOA (US), Natwest Bank (UK),
HSBC (US,UK), LLoyds Bank (UK), Halifax Bank (UK) !

At here, I sell Bank Login = 15% (15 percent) Balance in Account Bank Login !

NOtice : All Account Login NOT HAVE SMS Banking – Don’t Ask more about it !

* SHIPPING:

SHIPPING UNLOCKED MOBILE + TABLET + LAPTOP + NOTEBOOK + MSR206 – MSR406-2G – MSR905H
– Ship iphone 3GS, iphone 4, iphone 4S = $200
– Ship Blackberry Touch = 100$
– Ship ipad 2 = $200
– SHip Laptop MACBOOK PRO,AIR = $220
– Ship Laptop SONY VAIO = $180
– Ship Laptop HP + DELL = $150
– Ship Laptop TOSHIBA + LENOVO = $150
Demo Trackking
(UPS Tracking) : 1ZAT3115A241600717
(FEDEX Trackking) : 278616921830276

* Giftcards : Amazon.Co.Uk , Amazon.Com , Ebay , NewEgg , Footlocker , Hookah-Hookah , DjPremium . . . . .

- I do NOT Guaranty for SHIPPING
– My Giftcards are FRESH.
– I Accept Requests For Sites
– Fee : 25-30% the real value of GCs

* ACCOUNT PAYPAL:

- HACKED PAYPAL Account with email and passwords
Tons of paypal accounts are available. $5-10 per Unverified , Verified paypal account have added banks , cards
– Paypal Verified with balance $1000 = $200
– Paypal Verified with balance $3000 = $450
– Paypal Verified with balance $5000 = $600
– Paypal Verified with balance $8000 = $900
and more accounts with balance different

***** CONTACT ME: Y!M: byeripper *****

- PAYMENT method: BTC (bitcoin) and WU
– you must make payment first.That’s my rules.
– if you want have my stuffs , please send money for me
– I just want business good, no scam or rip here.
– If you buy bulk . I will discount !!!
– cc from me always checked valid before send .that’s for sure
– i Will replace ccs if it not work within 12hours
– That’s all I want to say here
– i hope make more deal with all carding , shipper , casher …
– Thanks for keep a few minutes to read my topic !

Yahoo messenger: byeripper

email: byeripper@yahoo.fr

Skype id : candy_deal

Gmail : dumpspaul@gmail.com

ICQ : 692450206

Whatsapp : +23756342182


Thank Hope Too See You Soon

Write a comment