Search Results

Search found 6758 results on 271 pages for 'shell exec'.

Page 1/271 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Upgrading to Gnome Shell 3.4 in Ubuntu 11.10 broke both Unity and Gnome shell

    - by mac
    I have upgraded my gnome shell to 3.4 in Ubuntu 11.10 through sudo add-apt-repository ppa:ricotz/testing sudo add-apt-repository ppa:gnome3-team/gnome3 sudo apt-get update && sudo apt-get dist-upgrade sudo apt-get install gnome-shell But it broke my system. Gnome shell is completely broken - When I login it just shows desktop wallpaper and nothing else. And importantly Unity is also broken. Attaching the screenshot Some main issues 1)Two menus are appearing now - Global menu as well as application menu 2)Icons on top-right panel are appearing weirdly 3)My Default Ambiance Theme also got screwed. Instead of black color menus, I am seeing white color menus. How do I fix them? Or Do I have an option to revert back to original settings or will reinstalling Unity/Gnome Shell helps ? Thanks

    Read the article

  • DB API for shell scripting (any shell)

    - by foampile
    I am faced with some legacy shell scripts that run batch data processing jobs in Oracle using SQL+. For the most part, the data tier does not have to communicate back to the script with retrieved data to be passed for shell-level processing but in a few cases it does. The problem is, SQL+ is really meant to be an end user app and not an API that can communicate with other clients programmaticaly. That is why people have invented APIs such as DBD::DBI for Perl, JDBC for Java, ODBC etc. The way it is done is they invoke SQL+ and then parse the output, which is clearly designed for human eye consumption, using tools like sed and awk. The whole thing is at best a hack and very prone to bugs. Since this client is rather conservative with their technology, they don't want to scale their scripts up to Perl or Python where there are data access APIs. So I am wondering whether there are similar APIs for shell, e.g. K or bash. What I would like is if an API would return data in a 2-dimensional array or strings (for the lack of type setting) so that I can just read DB data like that. The way they do it now is akin to parsing regular web page HTML to get a single stock quote rather than cleanly calling a web service and be done with it. Anybody know of a product I can use? Thanks

    Read the article

  • Installing gnome shell extensions from extensions.gnome.org fails silently

    - by Pascal
    On a fresh Ubuntu install (12.04, 64-bit), after installing gnome-shell, I've tried to install some extensions from extensions.gnome.org but got no result. I've tried with Firefox and Chromium and got the same issue. Open any extension page on extensions.gnome.org. Switch extension to "ON". Agree with confirmation about installation. Nothing happens and nothing has been installed (.local/share/gnome-shell/extensions is empty). I've checked .xsession-errors, Firefox's javascript console, gnome-shell console errors (Alt-F2 + looking glass). There isn't any trace of any error.

    Read the article

  • export command within shell script

    - by shantanuo
    When I use export command at command prompt, it works as expected. But it does not work from shell script. [root@server shantanu]# export myip=10 [root@server shantanu]# echo $myip 10 [root@server shantanu]# vi myip.sh #!/bin/sh export myipadd=10 [root@server shantanu]# sh -xv myip.sh #!/bin/sh export myipadd=10 + export myipadd=10 + myipadd=10 [root@server shantanu]# echo $myipadd I want to make the variable available to the same script next time when it runs. In other words I am looking for some way to memorize the variable value.

    Read the article

  • How to install theme without using user-theme extension [Gnome Shell]

    - by Aventinus_
    I'm using Ubuntu 12.04 with Gnome Shell 3.4. Since day one I had some random crashes mainly after reloading or during search. After a lot of research I concluded that user-theme extension is to blame. Only when disabled Gnome Shell runs 100% smoothly. So my question is: Is there a way to install a theme without using user-theme extension? edit: Trying to install it via Gnome Tweak Tool without user-theme extension won't work because of [this][1].

    Read the article

  • need to know about type of shell and which is best one?

    - by JK Patel
    i am new in the Ubuntu. And basically i am windows user, so i am searching about the feature of Ubuntu. then i got a word Named"Shell" so i searching about it and i get list of shell so i am confused which shell i use and which shell is generally used. so i want to know about the shell? how many type of shell are available in Ubuntu and which is best one among all@generaly used, featured and simple? thanks in advance!

    Read the article

  • How can I kill and wait for background processes to finish in a shell script when I Ctrl+C it?

    - by slipheed
    I'm trying to set up a shell script so that it runs background processes, and when I ctrl+C the shell script, it kills the children, then exits. The best that I've managed to come up with is this. It appears that kill 0 -INT also kills the script before the wait happens, so the shell script dies before the children complete. Any ideas on how I can make this shell script wait for the children to die after sending INT? #!/bin/bash trap 'killall' INT killall() { echo **** Shutting down... **** kill 0 -INT wait # Why doesn't this wait?? echo DONE } process1 & process2 & process3 & cat # wait forever

    Read the article

  • JDK 7u25: Solutions to Issues caused by changes to Runtime.exec

    - by Devika Gollapudi
    The following examples were prepared by Java engineering for the benefit of Java developers who may have faced issues with Runtime.exec on the Windows platform. Background In JDK 7u21, the decoding of command strings specified to Runtime.exec(String), Runtime.exec(String,String[]) and Runtime.exec(String,String[],File) methods, has been made more strict. See JDK 7u21 Release Notes for more information. This caused several issues for applications. The following section describes some of the problems faced by developers and their solutions. Note: In JDK 7u25, the system property jdk.lang.Process.allowAmbigousCommands can be used to relax the checking process and helps as a workaround for some applications that cannot be changed. The workaround is only effective for applications that are run without a SecurityManager. See JDK 7u25 Release Notes for more information. Note: To understand the details of the Windows API CreateProcess call, see: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx There are two forms of Runtime.exec calls: with the command as string: "Runtime.exec(String command[, ...])" with the command as string array: "Runtime.exec(String[] cmdarray [, ...] )" The issues described in this section relate to the first form of call. With the first call form, developers expect the command to be passed "as is" to Windows where the command needs be split into its executable name and arguments parts first. But, in accordance with Java API, the command argument is split into executable name and arguments by spaces. Problem 1: "The file path for the command includes spaces" In the call: Runtime.getRuntime().exec("c:\\Program Files\\do.exe") the argument is split by spaces to an array of strings as: c:\\Program, Files\\do.exe The first element of parsed array is interpreted as the executable name, verified by SecurityManager (if present) and surrounded by quotations to avoid ambiguity in executable path. This results in the wrong command: "c:\\Program" "Files\\do.exe" which will fail. Solution: Use the ProcessBuilder class, or the Runtime.exec(String[] cmdarray [, ...] ) call, or quote the executable path. Where it is not possible to change the application code and where a SecurityManager is not used, the Java property jdk.lang.Process.allowAmbigousCommands could be used by setting its value to "true" from the command line: -Djdk.lang.Process.allowAmbigousCommands=true This will relax the checking process to allow ambiguous input. Examples: new ProcessBuilder("c:\\Program Files\\do.exe").start() Runtime.getRuntime().exec(new String[]{"c:\\Program Files\\do.exe"}) Runtime.getRuntime().exec("\"c:\\Program Files\\do.exe\"") Problem 2: "Shell command/.bat/.cmd IO redirection" The following implicit cmd.exe calls: Runtime.getRuntime().exec("dir temp.txt") new ProcessBuilder("foo.bat", "", "temp.txt").start() Runtime.getRuntime().exec(new String[]{"foo.cmd", "", "temp.txt"}) lead to the wrong command: "XXXX" "" temp.txt Solution: To specify the command correctly, use the following options: Runtime.getRuntime().exec("cmd /C \"dir temp.txt\"") new ProcessBuilder("cmd", "/C", "foo.bat temp.txt").start() Runtime.getRuntime().exec(new String[]{"cmd", "/C", "foo.cmd temp.txt"}) or Process p = new ProcessBuilder("cmd", "/C" "XXX").redirectOutput(new File("temp.txt")).start(); Problem 3: "Group execution of shell command and/or .bat/.cmd files" Due to enforced verification procedure, arguments in the following calls create the wrong commands.: Runtime.getRuntime().exec("first.bat && second.bat") new ProcessBuilder("dir", "&&", "second.bat").start() Runtime.getRuntime().exec(new String[]{"dir", "|", "more"}) Solution: To specify the command correctly, use the following options: Runtime.exec("cmd /C \"first.bat && second.bat\"") new ProcessBuilder("cmd", "/C", "dir && second.bat").start() Runtime.exec(new String[]{"cmd", "/C", "dir | more"}) The same scenario also works for the "&", "||", "^" operators of the cmd.exe shell. Problem 4: ".bat/.cmd with special DOS chars in quoted params” Due to enforced verification, arguments in the following calls will cause exceptions to be thrown.: Runtime.getRuntime().exec("log.bat \"error new ProcessBuilder("log.bat", "error Runtime.getRuntime().exec(new String[]{"log.bat", "error Solution: To specify the command correctly, use the following options: Runtime.getRuntime().exec("cmd /C log.bat \"error new ProcessBuilder("cmd", "/C", "log.bat", "error Runtime.getRuntime().exec(new String[]{"cmd", "/C", "log.bat", "error Examples: Complicated redirection for shell construction: cmd /c dir /b C:\ "my lovely spaces.txt" becomes Runtime.getRuntime().exec(new String[]{"cmd", "/C", "dir \b \"my lovely spaces.txt\"" }); The Golden Rule: In most cases, cmd.exe has two arguments: "/C" and the command for interpretation.

    Read the article

  • Run shell command from child shell

    - by LinuxPenseur
    Hi, I have a Unix shell script test.sh. Within the script i would like to invoke another shell and then execute the rest of the commands in the shell script from the child shell and exit To make it clear: test.sh #! /bin/bash /bin/bash /* create child shell */ <shell-command1> <shell-command2> ...... <shell-commandN> exit 0 What my intention is to run the shell-commands1 to shell-commandN from the child shell. Kindly tell me how to do this

    Read the article

  • Strange behavior when changing default shell, and setting explorer.exe as winlogon shell for specific user

    - by Ophir Yoktan
    I use a custom logon shell on a machine (windows 7) for security reasons - which works fine by altering HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\shell. However, I also want that the administrator will still be able to manage the machine, so I modified the user specific key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\shell back to explorer.exe - but when I log on I get a single windows explorer window, and not the full desktop. does any one know how to configure the normal desktop shell only to a specific user?

    Read the article

  • Gnome Shell Theme Problem on Ubuntu 11.10

    - by Khurram Majeed
    I am trying to install ANewStart GNOME shell themes on Ubuntu 11.10. I have installed gnome shell extension for themes: sudo add-apt-repository ppa:webupd8team/gnome3 sudo apt-get update sudo apt-get install gnome-shell-extensions-user-theme I got the instructions from here ANewStart GNOME Shell Theme + AwOken Icons Theme = Pure Art. But when I go to "Advanced Settings - Shell Extensions" its empty... There is nothing. Also there is a orange triangle sign next to Shell Theme drop down in Advanced Settings - Theme. When I try to run the gnome-tweak-tool from terminal I get following error: imresh@imresh-laptop:~$ gnome-tweak-tool CRITICAL: Error parsing schema org.gnome.shell (/usr/share/glib-2.0/schemas/org.gnome.shell.gschema.xml) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gtweak/gsettings.py", line 45, in __init__ summary = key.getElementsByTagName("summary")[0].childNodes[0].data IndexError: list index out of range WARNING : Error detecting shell Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell_extensions.py", line 145, in __init__ shell = GnomeShellFactory().get_shell() File "/usr/lib/python2.7/dist-packages/gtweak/utils.py", line 38, in getinstance instances[cls] = cls() File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 123, in __init__ v = map(int,proxy.version.split(".")) File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 46, in version return json.loads(self.execute_js('const Config = imports.misc.config; Config.PACKAGE_VERSION')) File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 39, in execute_js result, output = self.proxy.Eval('(s)', js) File "/usr/lib/python2.7/dist-packages/gi/overrides/Gio.py", line 148, in __call__ kwargs.get('flags', 0), kwargs.get('timeout', -1), None) File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function return info.invoke(*args, **kwargs) GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files WARNING : Shell not running Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 57, in __init__ self._shell = GnomeShellFactory().get_shell() File "/usr/lib/python2.7/dist-packages/gtweak/utils.py", line 38, in getinstance instances[cls] = cls() File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 123, in __init__ v = map(int,proxy.version.split(".")) File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 46, in version return json.loads(self.execute_js('const Config = imports.misc.config; Config.PACKAGE_VERSION')) File "/usr/lib/python2.7/dist-packages/gtweak/gshellwrapper.py", line 39, in execute_js result, output = self.proxy.Eval('(s)', js) File "/usr/lib/python2.7/dist-packages/gi/overrides/Gio.py", line 148, in __call__ kwargs.get('flags', 0), kwargs.get('timeout', -1), None) File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function return info.invoke(*args, **kwargs) GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Shell was not provided by any .service files WARNING : Could not list shell extensions Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gtweak/tweaks/tweak_shell.py", line 62, in __init__ extensions = self._shell.list_extensions() AttributeError: ShellThemeTweak instance has no attribute '_shell' (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed (gnome-tweak-tool:5323): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion `width >= 0' failed Please help me in fixing this. I have also restarted the computer many times it does not make a difference.

    Read the article

  • change from bash shell prompt to regular shell prompt on centos

    - by user881480
    my centos environment has just become bash shell prompt: -bash-3.2# how do I change it back to the usual # prompt? what places should I check for possibly modifications? Update: I was not clear in my question: the prompt used to be just a single # and supports more syntax(a different shell script than bash 3.2 perhaps)? I would like to switch back to that. for example, ll is not longer supported in this bash shell

    Read the article

  • How to remove adornments like [exec] when using groovy's AntBuilder

    - by Miguel Pardal
    Hi! I'm using Groovy's AntBuilder to execute Ant tasks: def ant = new AntBuilder() ant.sequential { ant.exec(executable: "cmd", dir: "..", resultproperty: "exec-ret-code") { arg(value: "/c") arg(line: "dir") } } The output lines are prefixed by: [exec] Using Ant on the command line, this is turned off by "emacs mode" ant -emacs ... Is there a way to switch to emacs mode using AntBuilder?

    Read the article

  • Why does installing gnome shell extensions from extensions.gnome.org fail silently?

    - by Pascal
    On a fresh Ubuntu install (12.04, 64-bit), after installing gnome-shell, I've tried to install some extensions from extensions.gnome.org but got no result. I've tried with Firefox and Chromium and got the same issue. Open any extension page on extensions.gnome.org. Switch extension to "ON". Agree with confirmation about installation. Nothing happens and nothing has been installed (.local/share/gnome-shell/extensions is empty). I've checked .xsession-errors, Firefox's javascript console, gnome-shell console errors (Alt-F2 + looking glass). There isn't any trace of any error.

    Read the article

  • GNOME Shell Overview animation is slow on my NVIDIA 320M

    - by AllanCaeg
    I'm running Ubuntu 10.10 on my MacBook Air 11" (late 2010 model 3,1). Compiz runs fine, as well as most of GNOME Shell's animations. The animation for switching to and from GNOME Shell overview is just very slow. Unfortunately, it's the most common animation on Shell. I already applied cd ~/gnome-shell/source/gnome-shell curl http://bugzilla-attachments.gnome.org/attachment.cgi?id=157326 > shell-animations-nvidia.patch git am shell-animations-nvidia.pat that I found from http://live.gnome.org/GnomeShell/SwatList , but the issue's still here. How do I fix this? EDIT: Apparently, it's an NVIDIA driver bug, which has something to do with the message tray. Is this correct? How do I go around this issue?

    Read the article

  • GNOME Shell Overview animation is slow on my NVIDIA 320M

    - by AllanCaeg
    I'm running Ubuntu 10.10 on my MacBook Air 11" (late 2010 model 3,1). Compiz runs fine, as well as most of GNOME Shell's animations. The animation for switching to and from GNOME Shell overview is just very slow. Unfortunately, it's the most common animation on Shell. I already applied cd ~/gnome-shell/source/gnome-shell $ curl http://bugzilla-attachments.gnome.org/attachment.cgi?id=157326 > shell-animations-nvidia.patch $ git am shell-animations-nvidia.pat that I found from http://live.gnome.org/GnomeShell/SwatList , but the issue's still here. How do I fix this?

    Read the article

  • Running ssh-agent from a shell script

    - by Dan
    I'm trying to create a shell script that, among other things, starts up ssh-agent and adds a private key to the agent. Example: #!/bin/bash # ... ssh-agent $SHELL ssh-add /path/to/key # ... The problem with this is ssh-agent apparently kicks off another instance of $SHELL (in my case, bash) and from the script's perspective it's executed everything and ssh-add and anything below it is never run. How can I run ssh-agent from my shell script and keep it moving on down the list of commands?

    Read the article

  • Execute command from file in current shell

    - by Pandya
    I want to executed command from file (which is script) in current shell in terminal. Example: I have file ch_dir contains following: #!/bin/bash cd /usr Now if I execute file usually as following then it executes commands in different shell: pandya@pandya-desktop:~$ ./ch_dir pandya@pandya-desktop:~$ Here cd /user is executed in different shell. But I want to execute in Current shell. How do I do that? Note: Here cd is only used to explain. Question's aim is to execute any command in current shell

    Read the article

  • How to start gnome-shell?

    - by Tim
    I successfully installed the gnome 3 gnome-shell from the launchpad ppa on my fully updated Natty test system. However, nothing I tried could get it to actually run. If I selected it in the startup options, I got a plain light blue screen with absolutely nothing on it. If I tried to start it using "gnome-shell --replace", I got: gnome-shell --replace & [2] 3251 tim@nattytest:/usr/lib$ Traceback (most recent call last): File "/usr/bin/gnome-shell", line 705, in normal_exit = run_shell() File "/usr/bin/gnome-shell", line 293, in run_shell if shell is None: UnboundLocalError: local variable 'shell' referenced before assignment /usr/bin/compiz (core) - Error: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager. [2]+ Exit 1 gnome-shell --replace I also tried preceding that with metacity --replace, as suggested at ubuntuforums.com. But, I got the same failure. I also linked /usr/lib/libmozjs.so to /usr/lib/xulrunner-2.0b12/libmozjs.so, which did not help either. No matter what I try, I get the same error messages. Thanks.

    Read the article

  • How to start gnome-shell?

    - by Tim
    I successfully installed GNOME 3 and GNOME Shell from the Launchpad PPA on my fully updated Natty test system. However, nothing I tried could get it to actually run. If I selected it in the startup options, I got a plain light blue screen with absolutely nothing on it. If I tried to start it using gnome-shell --replace, I got: gnome-shell --replace & [2] 3251 tim@nattytest:/usr/lib$ Traceback (most recent call last): File "/usr/bin/gnome-shell", line 705, in <module> normal_exit = run_shell() File "/usr/bin/gnome-shell", line 293, in run_shell if shell is None: UnboundLocalError: local variable 'shell' referenced before assignment /usr/bin/compiz (core) - Error: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager. [2]+ Exit 1 gnome-shell --replace I also tried preceding that with metacity --replace, as suggested at ubuntuforums.com. But, I got the same failure. I also linked /usr/lib/libmozjs.so to /usr/lib/xulrunner-2.0b12/libmozjs.so, which did not help either. No matter what I try, I get the same error messages.

    Read the article

  • Shell extension installation not recognized by Windows 7 64-bit shell

    - by Avalanchis
    I have a Copy Hook Handler shell extension that I'm trying to install on Windows 7 64-bit. The shell extension DLL is compiled in two separate versions for 32-bit and 64-bit Windows. The DLL implements DLLRegisterServer which adds the necessary registry entries. After adding the registry entries, it calls the following line of code to nofity the Windows shell: SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL); Everything works great on Windows7 32-bit. The shell recognizes the extension immediately. On 64-bit, the shell extension is only recognized after the shell is restarted. Is there anything I can do to cause the extension to be recognized without restarting the 64-bit shell?

    Read the article

  • cd not doing anything in the Windows Shell [closed]

    - by ACarter
    Possible Duplicate: Using cd Command in Windows Command Line, Can’t Navigate to D:\ Look at the latter lines of the shell, the cd lines. Nothing's happening :( This is the Win8 shell. I used to have Win7 on C:\, and have since installed Win8 on D:. As you can see, the prompt is in C:\, and so I'm trying to move it to D:\ where it should be. And nothing's happening. How can I change the directory? (Bonus points to anyone who can tell be how to change the default shell directory.

    Read the article

  • Perform shell operation through secure shell

    - by Ben
    Is it possible to perform a shell operation from a bash script through a secure shell. Here is an example of why you may want to do this. Lets say you have a simple unix operating system that you need only build and run on, but you want to do all of the development on another machine. I want to write a bash script that has the following functionality: scp file to location on other machine ssh to other machine cd into correct directory make run program scp results to file on original computer exit ssh Is this remotely possible? (Pardon the Pun :p)

    Read the article

  • In a Shell scripts, check version of installed package, make a decision based on output

    - by DJDarkViper
    Looking to write a cross distro / cross version shell script that makes sure a forced version of PHP is installed Example: Ubuntu 12.04 has 5.3, Ubuntu 13.10 has 5.5, Debian 7 has 5.4 I need this script, when run on a distro that has an old version of PHP, to update the repo to point to a package for 5.4, and if the distro has too new of a version, can downgrade to 5.4 appropriately. Im still not entirely comprehensive of Shell/Terminals technical limit of what you can do with it, but ill be perfectly frank that im still not totally used to existing tools The best I can think at the moment is: php -v | grep "PHP 5" but that returns a bunch of potentially changeable granular characters (PHP 5.4.4-14+deb7u5 (cli) (built: Oct 3 2013 09:24:58) ). Im not sure what to pipe to after this to extract out the characters im interested in Im not sure if im being totally clear, im not sure how to ask this.. Basically, in an automated shell script for Linux distros, how do I extract the PHP version (and just the PHP version number preferably) and make a decision based on that output EDIT This line ended up doing pretty dang good php -v | grep "PHP 5" | sed 's/.*PHP \([^-]*\).*/\1/' | cut -c 1-3 Bit long in the tooth, but gives me "5.3", "5.4", and "5.5" which is exactly what I need to work with

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >