Horje
change php version devilbox Code Example
change php version devilbox
function switch_php
    set input_file ~/devilbox/.env
    if grep 'PHP_SERVER='$argv $input_file
        sed -i 's/^PHP_SERVER/#PHP_SERVER/' $input_file
        sed -i 's/^#PHP_SERVER='$argv'/PHP_SERVER='$argv'/' $input_file
        grep '^PHP_SERVER*' $input_file
    else
        echo "There is no container for PHP " $argv
    end
end
change php version devilbox
# switch_php.fish
function switch_php
    set input_file ~/devilbox/.env
    if grep 'PHP_SERVER='$argv $input_file
        sed -i 's/^PHP_SERVER/#PHP_SERVER/' $input_file
        sed -i 's/^#PHP_SERVER='$argv'/PHP_SERVER='$argv'/' $input_file
        grep '^PHP_SERVER*' $input_file
    else
        echo "There is no container for PHP " $argv
    end
end




Shell

Related
Keep CMD open after BAT file executes Code Example Keep CMD open after BAT file executes Code Example
install homebrew package manager for ubuntu and depian based systems Code Example install homebrew package manager for ubuntu and depian based systems Code Example
conda install netcdf4 Code Example conda install netcdf4 Code Example
how to send data to pushgateway from a shell script Code Example how to send data to pushgateway from a shell script Code Example
dash plotly Code Example dash plotly Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10