Linux shell script was retrieved with echo outputs from edbplus sql results

I'm trying to call edbplus To count a table from a command line in a shell script, but I have retrieved from edbplus the number with other outputs in the same answer. I try to retrieve only the integer answer number.

COUNT = `. / Edbplus.sh -silent user / password @ localhost: 5444 / avm << - EOF
SET PAGESIZE 0 FEEDBACK OFF CHECK OFF HEADING OFF ECHO OFF
SELECT COUNT (ID) FROM MYTABLE
EXIT;
EOF`

Answer:

$ echo $ COUNT
6 ------------------- d always accepts 2 parameters: variable_name value

Do you know how to get only the whole number?

Linux – How do I write with the echo command using an existing environment variable in $ BASH_ENV?

I'm creating an application with CircleCI and would like to return an environment variable in $ BASH_ENV so that it stays between CircleCI steps.

A working example of this is:

echo & # 39; export TEST_NAME = $ (cat dockername.txt) & # 39; >> $ BASH_ENV

This will load the TEST_NAME correctly in the following CircleCI steps. I'm now trying to do the same thing, where the variable matches an existing environment variable.

export VAR = FOO
echo $ VAR // returns & # 39; FOO & # 39; out

echo & # 39; export TOKEN = $ VAR & # 39; >> $ BASH_ENV
// TOKEN returns null in the same and subsequent steps. I want it to be FOO

I've tried every variation of the syntax for this to work, but I can not seem to crack it. Any thoughts?

PHP – Echo query result

I have this code, which I found in an example.
I want to print all the values ​​stored in my database.

The value of $ email is 100% correct.


   
   
   
   $ result = mysql_query ($ sql);
while ($ row = mysql_fetch_array ($ result)) {
Echo "DATA:". $ row['name'] , $ row['surname'] , $ row['data'];
}


Where am I wrong?

wordpress.com – Help echo with the shortcode

i need help with this function, i have to show the strings $ md, $ dm, $ sd, $ ds

                                                                                // a dm - md
$ horarioDM = array (
Array (# a = => 04 04: 45,, & b = => # 06: 15 #),
Array (# a = => 05 05: 30,, & b = => 07 07: 15 #),
Array (# a = => 06 06: 30,, & b = => 08 08: 15 #),
Array (# a = => 07 07: 15,, & b = => 09 09: 15 #),
Array (# a = => 08 08: 15,, b b = => 10 10: 15 #),
Array (# a = => 09 09: 15,, & b => # 11: 15)),
Array (# a = => 09 09: 45,, & b => 12 12: 15 #),
Array (# a = => 10 10: 30,, & b => 13 13: 15 #),
Array (# a = => 11 11: 15,, b b = => 14 14: 15 #),
Array (# a = => 12 12: 00 #, & b => 15 15: 15)),
Array (# a = => 13 13: 15,, & b = => 16 16: 15 #),
Array (# a = => 13 13: 50,, & b => 16 16: 45 #),
Array (# a = => 14 14: 30,, & b => 17 17: 15 #),
Array (# a = => 15 15: 15,, & b => # 17: 45 #),
Array (# a = => 16 16:15,, & b = => 18 18: 15 #),
Array (# a = => 17 17: 15,, & b = => 19 19: 15 #),
Array (# a = => 18 18: 15,, & b => 20 20: 15 #),
Array (# a = => 19 19: 15,, & b = => 21 21: 00 #)
);
// a dm - sr
$ horarioSR = array (
Array (# a = => 06 06: 00 #, & b = => 07 07: 00 #),
Array (# a = => 09 09: 00 #, & b => 10 10: 00 #),
Array (# a = =>: 10: 00,, & b = => 11 11: 00 #),
Array (# a = => 11 11: 00,, & b = => 12 12: 00 #),
Array (# a = => 12 12: 00 #, & b => 13 13: 00 #),
Array (# a = => 13 13: 00 #, & b = => 14 14: 00 #),
Array (# a = => 16 16: 00 #, & b = => 17 17: 00 #)
);

$ ya = strtotime (date (Y Y-m-d H: i: s str, strtotime (now now #)));
$ fecha = strtotime (date (Y Y-m-d str, strtotime (now now #)));
$ diaDeLaSemana = date (& # 39; w & # 39 ;, strtotime (& # 39; now & # 39;));
$ i = $ diaDeLaSemana == 0? 1: 0;

$ md = & # 39; & # 39 ;;
/ * Echo data (# Y-m-d #, $ fecha). $ horarioDM[0]['b'], & # 39;
& # 39; date (& # 39; Y-m-d H: i & # 39 ;, $ ya); echo strtotime (date (& # 39; Y-m-d & # 39 ;, $ fecha). $ horarioDM[0]['b']). & # 39;
& # 39 ;. $ ya; Exit(); * / while (true) { $ dateFind = strtotime ((date (& # 39; Y-m-d & # 39 ;, $ fecha). $ horarioDM[$i]['b'])); if ($ dateFind> $ ya) { $ md = date (g: i a & # 39 ;, $ dateFind); break; }otherwise $ i ++; if ($ i> = count ($ horarioDM)) { $ fecha = strtotime (& # 39; + 1 day & # 39 ;, $ fecha); $ i = $ diaDeLaSemana == 0? 1: 0; } } $ fecha = strtotime (date (Y Y-m-d str, strtotime (now now #))); $ diaDeLaSemana = date (& # 39; w & # 39 ;, strtotime (& # 39; now & # 39;)); $ i = $ diaDeLaSemana == 0? 1: 0; $ dm = & # 39; & # 39 ;; while (true) { $ dateFind = strtotime ((date (& # 39; Y-m-d & # 39 ;, $ fecha). $ horarioDM[$i]['a'])); if ($ dateFind> $ ya) { $ dm = date (g: i a & # 39 ;, $ dateFind); break; }otherwise $ i ++; if ($ i> = count ($ horarioDM)) { $ fecha = strtotime (& # 39; + 1 day & # 39 ;, $ fecha); $ i = $ diaDeLaSemana == 0? 1: 0; } } // Santa pink $ fecha = strtotime (date (Y Y-m-d str, strtotime (now now #))); $ diaDeLaSemana = date (& # 39; w & # 39 ;, strtotime (& # 39; now & # 39;)); $ i = $ diaDeLaSemana == 0? 1: 0; $ sd = & # 39; & # 39 ;; while (true) { $ dateFind = strtotime ((date (& # 39; Y-m-d & # 39 ;, $ fecha). $ horarioSR[$i]['b'])); if ($ dateFind> $ ya) { $ sd = date (g: i a & # 39 ;, $ dateFind); break; }otherwise $ i ++; if ($ i> = count ($ horarioDM)) { $ fecha = strtotime (& # 39; + 1 day & # 39 ;, $ fecha); $ i = $ diaDeLaSemana == 0? 1: 0; } } $ fecha = strtotime (date (Y Y-m-d str, strtotime (now now #))); $ diaDeLaSemana = date (& # 39; w & # 39 ;, strtotime (& # 39; now & # 39;)); $ i = $ diaDeLaSemana == 0? 1: 0; $ ds = & # 39; & # 39 ;; while (true) { $ dateFind = strtotime ((date (& # 39; Y-m-d & # 39 ;, $ fecha). $ horarioSR[$i]['a'])); if ($ dateFind> $ ya) { $ ds = date (g: i a & # 39 ;, $ dateFind); break; }otherwise $ i ++; if ($ i> = count ($ horarioDM)) { $ fecha = strtotime (& # 39; + 1 day & # 39 ;, $ fecha); $ i = $ diaDeLaSemana == 0? 1: 0; } }

And that for the shortcode

add_shortcode (& # 39; md & # 39; & # 39; mdt & # 39;);
// add shortcode
Function dmt () {

echo $ dm;

}

Any idea?

PD: Sorry for my low english

Name of the echo tag if the post contains one of the tags

I'm trying to repeat one of the posts' posts. There are several tags, about 40.

At the moment I try:

Surname;
?>

The problem is, however, that only the first day of all contributions is spent. This is the tag with the ID 16. It even has the tag ID 16 for other posts that do not even have that tag.

How can I repeat only one of the tags if the posts have this tag (s)?

Ansible: How do I print / echo / debug variable name during the loop?

I have that in there setup / task / apps.yml:

- Name: Mac App Store | Install apps
shell: mas list | grep {{item.id}} || mas install {{item.id}}
with_items: "{{mac_store_apps}}"
register: result
changed_when: result.stdout.find (& # 39; Installed & # 39;)! = -1  

I know that I can use:

                        loop_control:
label: & # 39; {{item.name}} & # 39;

But I want to print something like "try installing" {{ Item name }}"before each execution, how can that be done?"

Low sound quality in Ubuntu 18.04.2 and white noise in main microphones + problems with crackling (echo suppression has not been resolved)

As the title says, I face problems with very poor audio quality and big microphone cracking + white noise in Ubuntu 18.04.2. This is a relatively new installation of Ubuntu. The only changes I make to the system are the installation of some programs like Discord, Steam, Spotify and Wine. I tried the fix from installing OSS and activating the microphone's echo cancellation, both of which do nothing. My motherboard is a gigabyte of H81M-DS2 (Rev.3.0) (Realtek Onboard Audio), if that helps. All help is appreciated! Apart from these problems, I love Ubuntu so far!

WordPress – I try to post by echo into a PHP file

I am working on a child motif that uses an ultimate member and redefines some of its features. Previously, he redefined the follow-up button and sent the information to a payment form. The form then sent the information to a Javascript file. The form is no longer used, so we're trying to send the information directly to a Javascript file, and I have not been using PHP for some time, so I'm a little lost. The only options that I find are form actions and methods that do not work. The function is

                                if (in_array ("um_customer", $ res-> roles)) {
$ nav_link = UM () -> permalinks () -> get_current_url (get_option (& permalink_structure & # 39;));
$ nav_link = remove_query_arg (& # 39; at_action & # 39 ;, $ nav_link);
$ nav_link = remove_query_arg (& # 39; subnav & # 39 ;, $ nav_link);
$ nav_link = add_query_arg (& # 39; profile tab & # 39 ;, $ id, $ nav_link);

And before that was the trigger

echo & # 39; follow & # 39;

The echo echo prints a "Follow" button, but the button appears, but I try to move the values ​​like "user1" and "user2" to another PHP file that inserts them into the database and the button you want to change This was sent in the other PHP file by the previous team. I'm having trouble sending it there. The previous method was a javascript file from the last line. This line generated the button that pressed a PHP code displayed form that took the payment information and then sent to a js form that took the information and verified the payment format, changed the "follow" to "follow request sent" and the remainder was sent to a PHP form, which, as I said, enter the information in the mysql database and give the second user the option to accept the following request. Ultimate Member does not offer this option, which is why it has been changed to a subordinate topic like this. Just the button to send the information to the php form. A And I have this problem with this button. Every help is appreciated.