This file contains hidden or 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
while IFS= read -r line;do | |
fields=($(printf "%s" "$line"|cut -d' ' --output-delimiter=' ' -f1-)) | |
echo "http://127.0.0.1:5000/services/rest/zzz/subscribe-withactor?mobilenum="${fields[1]}"&service_id="${fields[2]}"&shortcode="${fields[0]}"&message=&actor=MO;" | |
done < yourfile |
This file contains hidden or 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
#when you have no space left on your server and your link is weak you hace no choice to remove or compress files . of course you can use awk in normal way but somtimes you log or text file contain messy things and its hard to select all pattern between start of file and end | |
# i use awk flag(on and off) but in normal timestamp(clear with no messy things) you can use split option to extract log | |
#!/bin/bash | |
awk '/2017-03-01/{flag=1}flag;/2017-04-01/{flag=0}' huge.log | gzip > 2017-03 |
NewerOlder