General :: Bash_history File And Running Bash On Multiple Windows?

May 5, 2011

Despite the history file is unique (~/.bash_history) I see that the multiple bash processes run on different windows are not all updating that file. I presume that the bash is not taking into account this possibility (multiple bashes on multiple windows) and writes thus the history file in a simple straightforward way. This would mean that a number of history entries are lost. I've tried to find information but had no luck so far.

View 1 Replies


ADVERTISEMENT

General :: Windows - Running Multiple Operating Systems On One Laptop

Apr 23, 2011

I am in the process of running some benchmark tests on a variety of RDBMS, I am testing three different client operating systems.Would it be terrible to partition the HDD and install Ubuntu, Windows 7 and Solaris 10? If I do not do this, I will likely have to re-install the O.S numerous times due to changes in the database server o.s as well. The same question goes for the server; would it drastically effect the performance to install 3 server o.s on one server?

View 4 Replies View Related

General :: Bash Script To Read Csv File With Multiple Length Columns

Jul 27, 2011

I've searched everywhere and I can't come up with a good solution. For each line I need to find the average, min, and max. I've seen plenty of solutions where the number of columns is fixed, unfortunately for me these lines can get pretty large. My thought was to read each line individually into an array, loop through the array and find the avg, min, and max that way but i haven't had much luck. I can read each line using a while loop but I'm having trouble with the array part, or perhaps that's not the best solution?

View 14 Replies View Related

General :: Running Bash But Common Bash Commands Not Working?

Jul 17, 2010

below are the details of my system. I have bash as my current shell, some really common commands aren't working.

Do I need to do a re-installation of bash? Or how do I install a selection of bash commands which I need? (for example a subset of [URL])

Code:
root@sdptfw:~ # uname -a
Linux sdptfw.sdpt.co.za 2.4.36 #1 Tue Jul 22 13:13:24 GMT 2008 i686 i686 i386 GNU/Linux
root@sdptfw:~ # echo $SHELL$
/bin/bash$

[Code]....

View 13 Replies View Related

General :: Why Does Running A Program In Bash Work, When Running It In The Menu Doesn't?

Jul 26, 2010

I presume there is something in the JWM window manager - or Puppy Linux Lupu 5.01 itself that is conflicting with the normal loading of GMPLAYER....

I would like to know how to troubleshoot, and fix this problem if possible (even a workaround would be great).

View 1 Replies View Related

Ubuntu Servers :: Bash Script To Open 1 Screen Session With Multiple Windows?

Jul 28, 2010

I am trying to write a bash script to open 1 screen session with multiple windows... each one running a different service. Is this possible? I tried several things, and I can start up multiple sessions really easy.. but not 1 session with multiple windows...

I want this so I can attach to that session and quickly move between the different windows.

View 4 Replies View Related

Programming :: (BASH) How To Read Multiple Lines From Text File

Mar 11, 2011

For example, I have a text file with data which lists numerical values from two separate individuals

Code:
Person A
100
200
300
400
500
600
700
800
900
1000
1100
1200

Person B
1200
1100
1000
900
800
700
600
500
400
300
200
100

How would I go about reading the values for each Person, then being able to perform mathematical equations for each Person (finding the sum for example)?

View 13 Replies View Related

Programming :: Parse Multiple Variable From Text File With Bash?

Jul 13, 2010

I am trying to think of a logic where my file contains some data I had to read and do some processing. Issue is that file contains data multiple times. For example:

:::::::::::
var1=value1
var2=value2

[code].....

I have to read first paragraph of variables and do some processing and then move on until the end of file. Variable names are same in whole file but for each paragraph the value is different. I can't think of a logic to attain this task. How can I do it? It should be a simple bash script, but I am not able to work out.

View 2 Replies View Related

Ubuntu :: Set The Bash_history Size When Using The .bashrc File And Setting The "HISTSIZE=9000" Doesn't Work?

Jun 18, 2010

How do you set the bash_history size when using the .bashrc file and setting the "HISTSIZE=9000" doesn't work?

View 9 Replies View Related

General :: Write A Literal Bash Command In A Bash File?

Nov 29, 2010

I create a bash script that writes another bash file. But in the generated bash file I want to write a bash command in the file and not executing it.Here's my bash file:

Code:
#!/bin/bash
cat > ~/generateGridmix2data.sh << END

[code]...

View 6 Replies View Related

Programming :: Run Multiple Bash And Php Scripts From A Bash Script?

Jul 25, 2011

I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.

Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?

View 5 Replies View Related

General :: Bash - Mirroring Of Multiple Directories - Hard Linking

Apr 11, 2011

I have 5 FTP users that upload files (and subdirectories) in their home directory, i need to mirror theese directories beetween them and with a "master" directory (accessible from a 6th user). Files can contain spaces or others special caracters. All the files are in the same filesystem, and i want to use hard link because i don't want to waste 5 time the space of a single file. I tried with find but i cannot handle spaces in it.

View 1 Replies View Related

General :: Setting Multiple Switches In Grep - Bash Script ?

Feb 21, 2010

I'm working on setting multiple switches in grep.

Here's an example of how to run my script:

would (should) produce the results of this:

Right now i have some code to catch the inputs, using a variable "z":

Code:

Then:

Code:

I'm almost positive that the problem is in the bolded line above (for one thing, it always leaves off the initial "-e"). So basically i want a string that gives me "-e input" and concatenates as many times as necessary.

View 5 Replies View Related

Ubuntu :: Windows Text File Won't Run As Bash Script?

Mar 21, 2011

I created text for a bunch of "#!/bin/bash" scripts in MS SQL Server. Being on a Windows machine, I used Ultraedit to create text files for a few examples. After copying the files to a machine running Ubuntu 10.10, I changed group and owner, and made them executable. However, they won't execute. I get "file not found" errors. But, if I paste the content into text files created in Ubuntu, it runs fine.

View 1 Replies View Related

General :: Running A Bash Script Via Ssh?

Mar 12, 2010

I have a hardware audit script I want to run on several remote machines around my office. Is there a way to run the script that resides on my machine via ssh or do I need to copy the script to the local machine and then run it...

View 4 Replies View Related

General :: Running SQL Commands From Within Bash

Aug 1, 2010

I would be running SQL commands (UPDATE/SELECT) from within my bash script. I am completely new to this subject. Is MYSQL used for this purpose? Alternatively, what is sqlplus?

View 6 Replies View Related

General :: Launch Multiple Screen Sessions From A Single Bash Script?

Jul 11, 2011

I've written a script (that doesn't work) that looks something like this:

#!/bin/sh
screen -dmS "somename" somecommand
for i in {0..5}; do
screen -dmS "name$i" anothercommand $i
done

For some reason, if I copy and paste this into a terminal, it creates 7 detached screen sessions as I expect. If I run it from within a script, however, I get only the first session, "somename," when I run screen -ls.

Edit: If the same can be accomplished another way (e.g. with multiple screen windows instead of sessions), I would be open those solutions as well.

View 3 Replies View Related

General :: Bash Scripts - Comparing Multiple Items Or Conditions Using 'if' Statements?

Mar 12, 2011

comparing multiple items or conditions using 'if' statements? I want to do something if one or more conditions is true, for example:

If a = 1 or b = 1.

I've tried:

[Code]...

View 5 Replies View Related

General :: Create BASH Script To Process Multiple Inputs On Read

May 26, 2010

First post from a very new Linux user....I am trying to create a BASH script that will allow user to provide multiple directory names, Checks if the directory exists and if not create the directory.

I am using the following code:

Which works fine as long as the user enters a single directory name. How can I modify this so it will process all directory names user enters on the read response?

View 5 Replies View Related

General :: Way To Have Multiple X Severs Running In Different Shells?

May 24, 2010

Is there any way to have x server on multiple shells at a time?(eg. Sally is logged in on shell 6 with her own desktop cube while Rob is logged in on shell 7 with his own desktop cube, etc)

View 2 Replies View Related

General :: Bash - Start A Service Only If It Isn't Running?

Apr 16, 2010

I know I have to count how many instances are running: ps x | grep apache2 | wc -l result if it's running: 2, or else: 1 I also know there is a command called test that I could use to perform the verification, but I don't know how to use test with wc

View 3 Replies View Related

General :: Running Tsch Script In Bash?

Nov 2, 2010

I've got this simple script called test1, which I'm trying to execute in a bash shell using ./test1

Code:
#!/bin/tcsh
echo 'Hello world!'

[code]....

View 3 Replies View Related

General :: Running A Check In Bash Script?

Apr 3, 2011

so I wrote a small script that pretty much just takes in two numbers and counts from the first to the second, e.g.

unknown-hacker|544> count.sh 1 3
1
2
3

My problem is I want to make it so that if you input invalid parameters, such as non-numerical characters, more than 2 numbers, etc., you'd get an error message

View 15 Replies View Related

General :: Running Executable In Bash Script

Mar 27, 2011

I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into runSorter.sh as you want and it will run the sorter executable for each one. So far, what I have looks like this:

#!/bin/bash
args=("$@")
INDEX=0
if [ -z args ]; then
echo "Error"
else
while [ $# -gt $INDEX ]; do
NUM=${args[$INDEX]}
echo $NUM
echo ./sorter $NUM
let INDEX=INDEX+1
done
fi

My problem is that when I run ./run-sorter.sh 100 on my terminal, it just prints this to the screen:
./sorter 100
How can I have so that it properly executes sorter and outputs everything to a text file?

View 4 Replies View Related

General :: Bash Script Not Running On Centos?

Nov 25, 2010

I am a newbie in linux. I tried to write an autorun bash script on /root and select System-Preferences-More Preferences-Sessions-Startup Programs-Add.But the bash script seems like not working. Following is my bash script:

#!/bin/bash
#
#chkconfig:345 99 99

[code]...

View 8 Replies View Related

General :: Check Which Version Of Bash I'm Running ?

Aug 16, 2010

How can I check which version of bash I'm running

View 2 Replies View Related

General :: Can Bash Check If Screensaver Is Running

Nov 13, 2010

I have a bash script that messages the user periodically. Is there any way in the script to check if the screensaver is running, so the script doesn't spam messages while the user is away? The xscreensaver process is always running in the background, I've noticed.

View 5 Replies View Related

Security :: Setup File Permissions For Multiple Groups/users That Use Windows?

Nov 2, 2010

I have a remote directory shared over NFS called tech with perms set as 0750 and owner set to root:tech. I have 2 groups: tech, and techAdmin. tech can read and execute within tech/. techAdmin can read, write, execute. I have 4 users: user1, user2, user3, user4. user1 and user2 is a member of techAdmin, user3 and user4 are members of tech. simple so far...but wait here's the problem. If user1 creates a file inside tech, user2 cant read or modify it because user1 owns it. Here's a few sites that reference this problem:

[code]....

View 4 Replies View Related

General :: Running A Program In Multiple Subdirectories Simultaneously

Jul 8, 2011

Performing commands in multiple subdirectories simultaneously. I'd like to run a program I've copied into every subdirectory which takes *.in files in the current directory as input files. I can find the program, but how do I tell it to run when I've found it?

View 1 Replies View Related

General :: Running Multiple Commands Remotely Via SSH In A Script?

Dec 18, 2009

In a script I am writing I am trying to add logic so that the script can figure out if a remote server uses rpm or dpkg and then run the appropriate command to print a list of installed packages. This works locally, but I need to get it to work through SSH and I have no idea how to do that. The relevant portion of the script is below. It would also be nice to find a way to not need the full path to the executables but I'm not real concerned about that.So anyone know how to make this code work via SSH?

Code:
if [ -x /usr/bin/dpkg ]; then
dpkg --get-selections

[code]...

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved