1. am required to create a bash-shell script called terminator that terminates all processes of a name given to the shell script as an argument. Make sure the terminator shell script will not take any crucial file system services as arguments.
2. Show how you would configure an Ethernet card by reapplying your existing IP and network mask
3. Install a workable nfs file sharing system between your system and a remote system, using optimum values for resize and wsize.To demonstrate send a 512Mb block of random data between client and server using the dd command.Write down the relevant steps and procedures
I know I was asked about wanting to change/upgrade my shell during the upgrade from Lenny to Squeeze, but I can't remember what it said, and I can't find any documentation about it online. But did something change to bash? Is this documented somehwere?Most notably I see progress messages on one line, overwriting eachother (for instance during an aptitude safe-upgrade).
I am getting more and more comfortable working with the shell, thus I would like to change its prompt color to my liking, as it will be easier for me to distinguish commands vs. outputs.
I've read a couple of instructions of how to change the .bashrc file and am familiar with what the codes in PS1 mean. Except, this file can be intimidating to newbie eyes.
Where exactly on the file is it that I need to make the change?
Here is what I am trying to do. I would like my prompt to like exactly like the prompt I use in Backtrack - which consist in two different colors, one for the host and another for the pwd. Here is what the Backtrack .bashrc file looks like:
# /etc/profile: This file contains system-wide defaults used by # all Bourne (and related) shells. # Set the values for some environment variables: export MINICOM="-c on" export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man:/usr/local/share/man:/usr/bin/man:/usr/share/man export HOSTNAME="`cat /etc/HOSTNAME`"
[Code]....
I also read that in order to have the same results when I log in as root, I will have to copy the modified .bashrc file into /root
I am running a Java application on the command line bash terminal under Mint Debian. I have JDK1.6.0_22 installed 64-bit, and the OS is 64-bit too. I have a few JAR files in the directory and a few native LWJGL libraries. When I run the application using the command line, all works fine. Lets assume my directory where the files are is called /home/riz/MyGame. I change to that directory and this is the command I use code...
Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells?
Example:
Code:
>>> import subprocess >>> help(subprocess) ... [pages of stuff to read] ...
I'm hoping so as I hate scrolling and love how less works with simple keystrokes for page-up/page-down/searching etc.
1. How do I create an array with 5 entries 2. Output one of the entries in the array randomly 3. Subtract the entry output from the array 4. Repeat steps 2 and 3 until there are no more entries in the array
I know that it's possible to create panoramic photos very easily with hugin. But I would like to create a script for nautilus where I select my picture and then create a panoramic without any questions.I guess it's possible but I can't find on google, each time I find something about hugin.Is it possible to call from the command line and hide the interface during the process ?
I want to create a shell script that I can run as a cron job to do automated backups. how to proceed. I have the source code and have pulled out the backup source files. Here is the link for the source code. The download is at the bottom of this page. The backup files can be found in the src folder listed as backup.cpp and backup.h [URL]
If someone can do this, I believe it will make a nice addition to the Basket application for all.
Also I am not running Kubuntu I am running Karmic 9.10 64 bit
I would like to a build a CD image (of CentOS 5, x86_64 that loads into memory and boots to the OS without installing anything to hard drives. Then I would like the system to execute a shell script automatically. The shell script will have commands that will control execution.
The goal of this exercise is basically to pre-configure a system (RAID config, BIOS update, etc) automatically using the shell script before installing the OS. I would like the ability to change the shell script as needed and probably repackage the ISO image. I would prefer not to deal with building a source tree to accomplish this. this is something one could do using mkisofs.
you can make a file that runs the contents as if typed out by the user in command prompt by saving the file as either .bat or .cmd . When using BASH in ubuntu, is it possible to save terminal executable files (from a text editor, like GEDIT), What file ending does it take, can i lay it out with just commands? (what is the syntax)
1. display menu until user quits the script 2. menu would give following options to a. create backup b. restore files from backup c. quit 3. for option a or b user would be required to specify the files and name of the archive] 4. has option to be run with use of parameters if that is the case it will not display menu but carry out required task unless it was not possible to do 5. incase of any errors are encountered it would call external scrpit that would display custom disigned error message.
I wrote a script for capturing port 5060 with tshark.Well, it's only a line, but I needed to send a positional var, and I couldn't do it with an alias. Now I need that script to run as a service, so I can start/stop. (Using CentOS)
Code:
#!/bin/bash # # capture service
[code]....
One more thing, my goal is to start/stop the service with
Code:
service myservice start|stop
Is that possible? I read that I must use chkconfig.
looking to write a dependency map tree that creates a tree structure of object names . This tree will be written to a file and read back to create the tree structure of files . how to write this using bash ?
I have a box that's used as an SFTP server. All users have restricted shell so they can only use SFTP to send and receive files. But it makes it hard to have them change their passwords. I thought that if we had a web page set up where the user could enter their username, old password, new password and confirmed new password, that this would be the easiest solution.
I am trying to create a custom service to manage a minecraft server what runs in a screen session (this is to allow easy console access as opposed to running it as a nohup background process). I am hitting two main issues with this script so far and wondering if anybody is able to shed some light on it, considering I am far from the greatest BASH scripter on Earth.
The issues are related to start and stop. the first issue with start is there is a command run "screen -dmS minecraft java -Xms1024M -Xmx1024M -jar /minecraft/minecraft.jar nogui" what doesn't appear to work, however when run from console (copy and pasted) this command seems to run perfectly. I am uncertain as to why this is not working within the script. Also if run from a script in /minecraft it also appears to work but in the minecraftd script I have created at /etc/init.d it does not work. I think the issue might be related to the location but am not certain on it, nor how to resolve it.
the second issue with stop is that it works sometimes but at other times it does not, overall it seems to work about 30~50% of the time. When it works it passes a couple of disconnection messages to the screen session and then gives the stop command (the command to gracefully terminate the minecraft server). It seems to work more often when using screen that I attach to the minecraft session while it is running but really not sure if this is an issue with my scripting or an issue with how I am passing things to screen.
The full code in /etc/init.d/minecraftd is below
Code:
#!/bin/bash ## Script Information ## Script Author: Berwick East
Is it possible to create a text based menu layout in bash were it is possible to browse through. The menu list should look something like this:
---------------------------------------- user: root colour: blue number: 4 animal: dog ----------------------------------------
At the start the cursor should blink at the r from root so that text can be entered. When pressing the enter the cursor should go to the b from blue and so on. the imported thing is that all the text is visible also beyond the position from the cursor.
I just set up apache on my PC and I cant change the permissions by right clicking because "I'm not the owner" and instead of using the chmod command on every file that I would like to edit I would just like to write a script on a text file, save it to my desktop so all I have to do is double click on it and boom I can edit all my files, etc.
I used c-shell previously in unix. One of the useful command I used frequently is foreach.> foreach a (`cat list`)>> echo $a need to use bash shell now instead, and realized that I can't use foreach anymore. The command is not found. Does anyone knows if there is similar command / function in bash shell?