Search Results

Search found 5177 results on 208 pages for 'fish shell'.

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

  • Advantages of a deployment tool over shell

    - by Jimmy
    Currently I have all of my deployment scripts in shell, which installs about 10 programs and configures them. The way I see it shell is a fantastic tool for this: Modular: Only one program per script, this way I can spread the programs across different servers Simple: Shell scripts are extremely simple and don't need any other software installed One-click: I only have to run the shell script once and everything is setup Agnostic: Most programmers can figure out shell, and don't need to know how to use a specific program. Versioning: Since my code is on github a simple git pull and restart all of supervisor will run my latest code. My question is, with all of these advantages, why is it people are constantly telling me to use a tool such as ansible or chef, and not to use shell.

    Read the article

  • Select (loop) or command not working in shell-script

    - by user208098
    I've been tinkering with Linux and Unix for years but still a novice in my mind and recently find myself trying to be more pro with it as I work in IT. So with that notion I'm studying shell scripting. I've hit a snag in ubuntu using the latest version 13.10 Saucy. When I use the select command in a sh script it doesn't work, depending on how I format the command it will either return Unexpected "do" or Unexpected "done". See the following two examples: This section of code produces an unexpected "do" error: #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit do case $opt in "option1") echo "you chose choice 1" ;; "option2") echo "you chose choice 2" ;; "option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done This section of code produces an unexpected "done" error. #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit ; do case $opt in "Option1") echo "you chose choice 1" ;; "Option2") echo "you chose choice 2" ;; "Option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done When I enter these parameters into the command line interactively or manually I get the desired result which is a list of choices to choose from. However when executed from a script I get the before mentioned errors. Also a side note I have tried this in Fedora as a script and it worked perfectly so my question is why isn't it working in Ubuntu, is this a difference between RHL and Debian? Or is it a bug in the latest version of Ubuntu? Thanks in advance for any help! KG

    Read the article

  • Regarding UNIX Shell Script

    - by arav
    When there is no files inside the folder the below script goes inside the for loop. Not sure what i can modify so that it doesn't go inside the for loop. Also when there is no files inside the directory exit status should be success. Wrapper script checks the exit status of the below script FILESRAW ="/exp/test1/folder" . for fspec in "$FILESRAW"/* ; do echo "$fspec" if [[ -f ${fspec} ]] ; then ..... processing logic else ... processing logic fi done

    Read the article

  • Regarding Unix shell script

    - by arav
    I want to retrieve the file from the INFILE directory which are begining with the file names prefix "BBSCGG_" or "BCT_" or "ACL_" or "ASC" and do the processing inside the for loop INFILE=/ext/test/fil1/ for infile name in file prefix ... if [[ -f ${fspec} ]] ; then processing logic else processing logic done how can i do it

    Read the article

  • shell script output in html + email that html

    - by Kimi
    Using Solaris I have a monitoring script that uses other scripts as plugins. Theses pugins are also scripts which work in difffernt ways like: 1. Sending an alert while high memory uilization 2. High Cpu usage 3. Full disk Space 4. chekcking the core file dump Now all this is dispalyed on my terminal and I want to put them in a HTML file/format and send it as a body of the mail not as attachment. Thanks .

    Read the article

  • How do i compare 2 strings in shell?

    - by Thomas
    I want the user to input something at the command line either -l or -e. so e.g. $./report.sh -e I want an if statement to split up whatever decision they make so i have tried... if [$1=="-e"]; echo "-e"; else; echo "-l"; fi obviously doesn't work though Thanks

    Read the article

  • Shell script to copy files

    - by Hulk
    If there exist a directory, /backup/ And the files in it are a.gz b.gz c.gz And another directory /backup-directorybackup And the files in it are a.gz I need a shells script to compare two directories if the files are present then ignore it and if the filesare not present copy it to the destination directory Thanks..

    Read the article

  • Korn Shell - Test with variable that may be not set

    - by C. Ross
    I have the following code in KornShell FAILURE=1 SUCCESS=0 isNumeric(){ if [ -n "$1" ]; then case $1 in *[!0-9]* | "") return $FAILURE; * ) return $SUCCESS; esac; else return $FAILURE; fi; } #... FILE_EXT=${FILE#*.} if [ isNumeric ${FILE_EXT} ]; then echo "Numbered file." fi #... In some cases the file name not have an extension, and this causes the FILE_EXT variable to be empty, which causes the following error: ./script[37]: test: 0403-004 Specify a parameter with this command. How should I be calling this function so that I do not get this error?

    Read the article

  • UNIX Programs (Shell Scripting) [closed]

    - by atif089
    Hi, I have an exam tomorrow and I need some help with these programs. Or if you can tell me where I can get these. Write a program which uses grep to search a file for a pattern and display search patterns on standard output Write an awk program to print only odd numbered lines of a file. Write a program to open the command ls and give the output to the command through which we count the number of files Thank You :)

    Read the article

  • Bash Shell Scripting - How to iterate through directories, and copy and rename files?

    - by Cypher
    I have a directory setup as follows: /hosted/partner1/logo.png /hosted/partner2/logo.png /hosted/partner3/logo.png /hosted/partner4/logo.png /hosted/partner5/logo.png ..etc. I want to write a script that can COPY those files to a different location, with a different file name, like this: /partners/partner1.png /partners/partner2.png /partners/partner3.png ..etc. Any ideas? I'm not so great with shell scripting and there are a lot of files that I need to migrate to a single directory...

    Read the article

  • Aligning a link to the bottom right of a table...in css

    - by IP
    I need to align "Click here" to the bottom right of this table...but in CSS it seems impossible Adding the link as a row or into the footer of the table is no an option <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <style type="text/css"> #link { float:right; } div { border:solid black; } table { border: solid red; } </style> </head> <body> <div> <table> <tr> <td>Fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish fish</td> </tr> </table> <a href="." id="link">Click me</a> </div> </body> </html> Any ideas?

    Read the article

  • How to resolve broken dependencies of gnome-shell-extensions-user-theme package?

    - by swift
    After unsuccessful upgrade of Gnome3 packages in new Precise Pangolin 64-bit environment I get this error: The following packages have unmet dependencies: gnome-shell-extensions : Conflicts: gnome-shell-extensions-user-theme but 3.2.0-2~webupd8~oneiric is to be installed I tried to remove by running sudo apt-get purge gnome-shell-extensions-user-theme but get this: Package gnome-shell-extensions-user-theme is not installed, so not removed My Gnome Classic profile works well but Gnome3 session can't run. How to resolve this error?

    Read the article

  • Launch ubuntu software center from gnome shell

    - by Daniel Hughes
    I have been playing around with Gnome Shell from ubuntu 9.10. I installed the preview which is available in Ubuntu 9.10 repositories using sudo apt-get install gnome-shell gnome-shell --replace However I can't figure out how to launch Ubuntu Software Center using it. It just appears to be missing. The software center appears fine in normal gnome. How do you launch the Ubuntu Software Center from Gnome Shell. For those of you who are getting confused, Gnome Shell is the next generation user interface for gnome, it is planned for inclusion as default in Gnome 3.0, there is a preview of it in the Ubuntu 9.10 repositories. I am not interested in how to launch Ubuntu Software Center from the terminal or in how to launch it from the normal gnome interface.

    Read the article

  • How to run Windows 7 Explorer shell with Administrator Privileges by default

    - by Barry Kelly
    The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process: Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the Start Menu, and selecting Exit Explorer Start Task Manager with Ctrl+Shift+Esc Elevate Task Manager privileges by going to Processes tab and selecting Show processes from all users Then start up a new instance of the shell by File | Run in Task Manager, typing in explorer, and selecting the Create this task with administrative privileges. After following the above process, the Windows shell will be running with administrative privileges, and any programs it launches will also have administrative privileges. This makes performing tasks that require the privilege far easier, particularly for command-line applications, which usually fail silently or with an Access denied. message rather than giving an opportunity to use UAC to elevate the process's privileges. What I'm interested in, though, is creating an account which uses a privileged shell by default, rather than having to follow this laborious process every time. How can it be done?

    Read the article

  • Run shell script on a command

    - by LinuxPenseur
    Hi, I want to run a shell script when date -s <string> command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script logger -p user.notice "date -s command executed" -f /tmp/user.log How can run a shell script when date -s <string> is executed on the shell? To make it more general, I want to run my shell script when someone else issues a particular linux command on my system. How to do this?

    Read the article

  • How can I change shell in Ubuntu?

    - by Sanoj
    I have a Ubuntu Server VPS and I want to use /bin/bash/ as my shell. How can I change my shell? I have root access but I don't work as root. So dash is my default shell now. I have read How do I make Bash my default shell on Ubuntu? and chsh seams to be the preferred way to go. But when I type chsh /bin/bash I get this message: chsh: unknown user /bin/bash And if I just type /bin/bash the Bash shell seams to work fine. How to change it?

    Read the article

  • Shell script issue: cron job script to Restart MySQL server when it stops accidentally

    - by Straw Hat
    I have this script, I am using it to setup CRON job to execute this script, so it can check if MySQL service is running; if not then it restart the MySQL service: #!/bin/bash service mysql status| grep 'mysql start/running' > /dev/null 2>&1 if [ $? != 0 ] then sudo service mysql restart fi I have setup cron job as. sudo crontab -e and then added, */1 * * * * /home/ubuntu/mysql-check.sh Problem is that it restart MySQL on every cron job execution.. even if server is running it restart the MySQL service what is correction in the script to do that.

    Read the article

  • Add "not" to if statement in shell script

    - by John Crawford
    I have the following script that should exist if the user does not exist. #check if user currently exists on system if id $User > /dev/null 2>&1 then #user exists no need to exit program echo "blah blah, what a waste of space" else echo "This user does NOT exists. Please create that user before using this script.\n" exit fi My problem is that I would ideally like to place a "not" if that first if statement so that I can trim down my if, else statement. Ideally I would like something like this: if !(id $User > /dev/null 2>&1) then echo "This user does NOT exists. Please create that user before using this script.\n" exit fi

    Read the article

  • Gnome-shell worskpace preview on dual screen

    - by martin
    I'have isntalled gnome3 and I have dual screens(laptop, monitor). Is it possible to see the other monitor in workspace preview in the gnome panel??? I only can see primary monitor, that's why i'm not able to move windows inside the second screen? I've tried to change some settings in dconf , but with no luck. I want to have it like this http://stephen.rees-carter.net/wp-content/uploads/2011/04/Unity-workspace-switcher.png Does anyone have a solution?

    Read the article

  • What does /dev/null mean in the shell?

    - by rishiag
    I've started learning bash scripting by using this guide: http://www.tldp.org/LDP/abs/abs-guide.pdf However I got stuck at the first script: cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Log files cleaned up." What do lines 2 and 3 do in Ubuntu (I understand cat)? Is it only for other Linux distributions? After running this script as root, the output I get is Log files cleaned up. But /var/log still contains all the files.

    Read the article

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