I have written small bash script to try to get the last x characters of a string. #!/bin/bash string=\"This is my string. I want THIS TEXT\"
I have an game ip in my database, like so: \"271.29.248.23:279开发者_C百科12\" I want the substring to take the last 5 numbers \"27912\" and also i want to delete the \":\".
I\'m unable to read regex.开发者_运维百科 Let\'s say we have this string: \"mydomain.bu.pu\" and I want to grab the \".bu.pu\" part of it;
let\'s say I want to return all chars after some needle char \'x\' from: $source_str = \"Tuex helo babe\".
PHP is one of those languages I use periodically, but usually have to dust the cobwebs off when I start using it again. The same applies this week whilst I port some C code to PHP. This uses a lot of
This is the content of one mysql table field: Flash LEDs: 0.5W LED lamps: 5mm Low Powers: 0.06W, 0.2W Remarks(1): this is remark1
I have a script that polls a MySQL database (Nagios, specifically) for the date/time of events.I want to count how many events occur in each hour based upon all of the data my script returns.
I want to extract a word from a string column of a table. description =========================== abc order_id: 2 xxxx yyy aa
This is one line of the input file: FOO BAR 0.40 0.20 0.40 0.50 0.60 0.80 0.50 0.50 0.50 -43.00 100010101101110101000111010
I have a string like sample.txt.pgp and I want to return sample.txt in a shell script (but, the string length will vary, so, basically all of the characters before the \".pgp\").Is there a substr func