Programming :: Invoke Methods Via Ssh On Servers From CSV?

Jan 14, 2011

I have to execute certain commands (like shutdown Tomcat) on several servers so I'm using a loop and ssh. I put the server's IP on a CSV file which I parse, execute the commands for each line and send the output to a file. The problem is that after processing one line the program stops execution. I wonder if someone could lend me a hand with this, I'm new in bash scripting and I ran out of ideas.

The CSV (servers.csv) file looks like this:

Code: 1 2

And the script looks like this:


while IFS=: read ip name
sshpass -p "pass" ssh -o "StrictHostKeyChecking no" root@"$ip" 'sh <CATALINA_BASE>/bin/' >> output.log
done < servers.csv

View 1 Replies


Debian Programming :: Emacs And ECB Missing Python Methods In Methods Window

May 12, 2014

I work with python and I use emacs as my IDE tool. I have been running Debian Squeeze (6.0.9) for some time now with emacs 23.2.1 and ecb 2.32. I am able to access my python methods in the ecb-methods window with no problems. However I recently upgraded my desktop to Debian Wheezy (7.5) running emacs 23.4.1 and ecb 2.40 but I have lost access to the methods in the ecb-methods window. The window is just empty while the others (directories, sources and history) are all populated. I have a second laptop which I decided to upgrade to Debian Jessie, however Jessie recommends emacs 23.4.1 which is running with ecb 2.40 also. The result is the same as on Wheezy.

I have used the ecb menus and googled for a solution or even just a mention that such a problem exists but have come up with nothing. Either I have a unique situation here or am doing something really dumb.

I would like to upgrade to Wheezy or Jessie but I need access to methods in the ecb methods window. How to keep my upgrade and see the methods in the methods window of the ecb system ....

View 0 Replies View Related

Ubuntu Servers :: Invoke Script On Boot By Pressing Key

May 1, 2011

I have created a script which asks the user a few questions and then it configures the wireless network. I'd like to run it somehow while Ubuntu still boots by pressing a key for example. Let's say, while booting, when it comes to the script I made, it will sleep for a few seconds giving the user the oportunity to press the pre-defined key (eg: spacebar). Once pressed, then the script will load.

View 7 Replies View Related

Programming :: Invoke The Calculator In Bash Script?

May 16, 2010

My main problem right now is doing floating point arithmetic within a bash script, with variables.Right now I have a folder called "myExamples" with a script called "run_example" that runs with no issues.I plan to(1) create many folders inside [myExamples], that are named [example10] [example11]...each containing an identical copy of (run_example),(2) modify Line 172 of each copy of (run_example) one copy, it would be 3.00, the next copy would have 3.05, etc. (This part doesn't work!)How can I use the available calculator bc code to do floating point operationsMy code is below -

# run from directory where this script is
cd `echo $0 | sed 's/(.*)/.*/1/'` # extract pathname


View 1 Replies View Related

Programming :: Invoke A ButtonPress Event Using XLib?

Nov 17, 2010

I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .

View 1 Replies View Related

Programming :: Invoke Cairo Functions From Glade?

Feb 12, 2011

I have created a glade file which so far have two regions in it:

1) On the right division is a toggle button which calls a C script when enabled.

2) I have a drawing area, in which I would like to plot a point (X-Y scatter plot). The plot should be generated dynamically using a C script. I am not sure how the integration between the two is possible for a drawing area.

In glade what properties of drawing area should I set? eg.expose event, realize etc. I was thinking of using cairo for generating the plot.

View 2 Replies View Related

Programming :: Not Able To Invoke Variable Values / Sort It?

May 5, 2010

I am trying to import variable values from a profile file to a perl program.
I am using the below command for doing it.


system (". /opt/bbfb/bin/setbbfbenv $codeset");

the above command does make variable values available to the running perl program..
Can some one help me on this front..

View 1 Replies View Related

Programming :: Can't Invoke A Command From Within Shell Script / Sort It?

May 17, 2010

When I try to invoke 'source' command from within a shell script, namely,, I get the following error message code...

View 1 Replies View Related

Ubuntu Servers :: Authentication Methods Over Network Shares And SFTP

Feb 15, 2010

I run some IT systems for my schools Engineering student organization.

We are upgrading our systems and I just purchased a new server system which I am configuring.

I am using Ubuntu 10.04 Lucid Lynx and the new likewise-open packages.

The points I bring up following this sentence are to fulfill this final goal : Get SFTP, SSH, and Network Share's over our private network all using the schools Active Directory for auth and it's groups to derive privs.

So... Here's what i've done and what i've tried to do.

1 ) I set up likewise-open and got it to join the domain. When I do this I can ssh to localhost as 'schoolnetworkADname'. So that part works (hurray). To get a network share to use these same auth methods I have tried installing likewise-open-server. Everything launches find and the daemons run, but when I go into computer management on a windows server to set up the actual shares, I get permission denied. The account it is giving permission denied to is the same AD account that join likewise-open to the network, so... what is going on.

2 ) Samba, fail. I can't seem to get samba to run on this machine at all, which is strange because even my Samba expert was puzzled. It just won't let Samba join the domain properly, and due to this, I want to keep on the newer likewise package... unless I have to switch to this.

How I can get the lame likewise-open-server to work?

View 1 Replies View Related

Programming :: Methods For Extracting Data Strings From Output Files?

Aug 23, 2010

I am trying to develop a method of reading files generated by other programs. I am trying to find the most versatile approach. I have been trying bash, and have been making good progress with sed, however I was wondering if there was a "standard" approach to this sort of thing. The main features I would like to implement concern reading finding strings based on various forms of context and storing them to variables and/or arrays. Here are the most general tasks:

a) Read the first word(or floating point) that comes after a given string (solved in another thread)

b) Read the nth line after a given string

c) Read all text between two given strings

d) Save the output of task a), task b) or task c) (above) into an array if the "given string(s)" is/are not unique.

e)Read text between two non-unique strings i.e. text between the nth occurrence of string1 and the mth occurrence of string2

As far as I can tell, those five scripts should be able to parse just about any text pattern. I am by no means fluent in these languages. But I could use a starting point. My main concern is speed. I intend to use these scripts in a program that reads and writes hundreds of input and output files--each with a different value of some parameter(s).

The files will most likely be no more than a few dozen lines, but I can think of some applications that could generate a few hundred lines. I have the input file generator down pretty well. Parsing the output is quite a bit trickier. And, of course, the option for parallelization will be very desirable for many practical applications.

View 14 Replies View Related

Programming :: Invoke Java From Bash Terminal Via Shell Script Fails Under Mint Debian / Fix It?

Feb 16, 2011

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...

View 3 Replies View Related

Programming :: Invoke The Calculator "bc" In Bash Script For Floating Point Arithmetic?

May 15, 2010

My main problem right now is doing floating point arithmetic within a bash script, with variables.Right now I have a folder called "myExamples" with a script called "run_example" that runs with no issues.I plan to(1) create many folders inside [myExamples], that are named [example10] [example11]...each containing an identical copy of (run_example),(2) modify Line 172 of each copy of (run_example) one copy, it would be 3.00, the next copy would have 3.05, etc. (This part doesn't work!)How can use the available calculator bc code to do floating point operations?My code is below -

# run from directory where this script is
cd `echo $0 | sed 's/(.*)/.*/1/'` # extract pathname


View 2 Replies View Related

General :: Php Cannot Invoke The Msmtp

Mar 7, 2011

I want to use php for mailing on linux.But when I do it with"$a=`msmtp < /u1/ftp/mail.txt &`",it does not work.The mail.txt's contents are following:


View 6 Replies View Related

Software :: How To Invoke The Xterminal

Jul 6, 2010

setting up the Xterminal ( xmanager ) application on Linux. I've installed Xterminal-1.0.7-1.i386.rpm on RHEL 4.0.May i know how could i invoke the installed application? What commands should i use?

View 13 Replies View Related

OpenSUSE :: 11.3 KDE - Adobe Air Not Able To Invoke Password Dialog

Jul 16, 2010

Adobe Air are not able to invoke the password dialog for installing apps in opensuse11.3 (i686) .. it waits for root password confirmation however there is no dialog window to input the password to. I've tried installing adobe air apps as both su and normal user, no mather what I do it's not envoking the password dialog..

I've also tried to install the gnome su library to see if it helps any but it don't...

I have also tried to reinstall Adobe Air using both the rpm installer and the binary installer from [URL], the binary installer won't even install.

I can get the use of the AIR apps I need ?

From AIR installation log [Adobe AIR Application Installer:12808][INFO] Waiting for user confirmation

Edit: By the way, I've also tried the normal troubleshooting such as removing the crypt cataloge, removing cache and etc..

View 5 Replies View Related

General :: How To Invoke Wireless Without Root Password

Apr 3, 2010

Whenever I got to type the command below:

#iwconfig eth1 essid mynetwork key xxxxxxxx
#dhclient eth1

to use this command, i have to be in su or sudo. Is there a way I could allow all users to invoke these commands without the root password?? I try to make a file (, which consists the commands above, in /usr/local/bin/. Change the mode to 755 (chmod 755 however, it does not allow me to use this also.

View 1 Replies View Related

General :: Udev Rule To Invoke A Script?

Mar 29, 2011

I am not good at writing udev rules. I am using RHEL 4.7, I would like to invoke a file which is in CDROM as soon as the CDROM is inserted

View 2 Replies View Related

Ubuntu :: Installed Lucid - Can't Invoke Programs After A While

Mar 22, 2011

I am running usb version of lucid 10.04.2, with many apt-get installs. Shortly after running awhile, programs will not run, I get either an "input/output error" or "Bus error (core dumped)". (Examples of programs rendered inoperable are top, df, file)

I've read something about a memory leak in Lucid, but in my case, the computer doesnt slow down, things just stop working. Is this a known problem with Lucid? I'm thinking maybe one of my apt-get installs corrupted something. Is this a known problem that has a software update available?

Here is the output of "top" which fortunately currently DOES work, while other progs don't. (the memory usage stays constantly in that 1.5 GB range)

Mem: 3056772k total, 1554952k used, 1501820k free, 173004k buffers
Swap: 0k total, 0k used, 0k free, 1081808k cached

View 2 Replies View Related

CentOS 5 :: Display Script That Users Can SSH In And Invoke?

May 11, 2009

I'm trying to do a little bit of setup on our new server and could use a hand.I'm working on creating a simple display script that our users can SSH in and invoke, here is what I'm attempting to do.


1. Must run X over ssh on Mac OS X 10.5 or greater

2. Must work in the office, or on the road

1. Set up the system to auth against LDAP (Open Directory)

2. Create a script on the PATH that checks which displays are available, and launches Xephyr for the first available one.

3. Create a client script that performs the SSH and Xephyr command so that users can simply click the script to start an X session.

I have 1 set up, but I'm having issues with 2 and hence 3. For instance, I can start XNest with the following commands.Start my SSH session

ssh ninet@ -X

Load XNest
Xnest :1 -ac -geometry 1024x768 -once -query localhost

View 2 Replies View Related

General :: Invoke A Function In Bash Shell Script?

Apr 24, 2010

I just wonder the distinction calling the function between $(one_function) and one_function in bash shell script.

When I set the variable PS1 in ~/.bashrc, I can't invoke the function by one_func

export PS1="
[e[31m] $(one_func) # it works
export PS1="
[e[31m] one_func # it doesn't work

View 3 Replies View Related

Ubuntu :: Invoke The Terminal In LINUX When A Process Becomes Unresponsive?

Jan 6, 2010

If a process becomes unresponsive in WINDOWS then we press "alt+ctrl+del" to invoke the task manager & then terminate the process.Is there any similar way to invoke the Linux Terminal so that we can end a process by the 'kill' command when it becomes unresponsive?

View 2 Replies View Related

Hardware :: Invoke GRUB2 Present On A Hard Disk From A CD Or A USB Drive?

Jan 26, 2011

I have a very strange problem. My computer is unable to boot from any hard disk but is able to boot from any CD or DVD. I have double-checked the BIOS settings and I am unable to figure out why is this happening. I have noticed that the Windows installer boots from the CD only if one presses a key when the message "Pressany key to boot from CD..." is displayed on the screen, otherwise it boots from the first hard disk.I have a triple boot system with Windows 7 (64-bit), Ubuntu 10.10 (64-bit), and Fedora 14 (64-bit). I have a dedicated GRUB2 partion on one of my disks. What I want is a boot-loader (any would do) on a CD/DVD/USB drive to chain load the GRUB2 present on my hard disk, without a delay, that is, without showing any message, menu, warning, etc. So, is there a way to do that?

View 6 Replies View Related

Ubuntu :: Alternate Downloading Methods On Besides Torrents?

Feb 13, 2010

Is there any other different new downloading methods on ubuntu besides torrents? I know newsgroup I used it on windows but anything for free? I've tried the free newsgroup server with sabnzbd but those are useless now since they don't work. I was reading about rss feed nzb downloading? how does that work?

View 2 Replies View Related

Ubuntu Networking :: Port Will Not Open Regardless Of Methods

Aug 18, 2010

No matter what I do, i cannot get port 3100 to open. This is for a new MMO i am CBT on. I know it works on windows because that is how I installed it and played. But I prefer being on Linux. Majority of all other MMOs work fine. Just this one has to have udp 3100 open.

The following is a rough output of all the methods I have tried with no success. As you can see I have done some extensive research first before posting here.

Now its become a lil bit of an obsession.

I cannot get the following command to work:

And yes I tried the "spaces" in different places thinking that was the prob. So i cannot see if 3100 is in the list or not

I eventually turned on the firewall "ufw enable" add the port there, and output:

Some references


Firewall stuff: [url]

I even manually went into the router and turned it on there.

I add these lines for startup purposes.

Do I need to do something in "wine" ?

I feel i am starting to repease myself

results of "iptables -L"


View 4 Replies View Related

Ubuntu :: Ibus Is Not Showing Input Methods

May 11, 2011

I have just installed ubuntu 11.04. Now I have installed, from the language support, the bengali language. And now select input method as ibus. Now when I am going to ibus preference to select input method, it is not showing any language, except chinese, which was installed by default. I am using ubuntu 11.04X64 bit version

View 2 Replies View Related

Ubuntu :: Keyboard Input Methods Not Showing Up?

Jun 2, 2011

I switched to pure LXDE desktop in my Ubuntu and now my Keyboard Input Methods dialog doesn't show up. When I click on the menu item nothing happens. The Preferences menu item in the keyboard icon in the panel doesn't work either.

View 9 Replies View Related

Slackware :: Methods To Rip CDs And FLAC Playback Quality?

Dec 19, 2010

first of all: I am not sure, if this is the right forum, as I don't know, if it is Slackware-relatedm, or if it is a general thing affecting other distros with KDE, as well. If the latter is the case, please let me know, where to post this (Linux Software or Linux Desktop forum?). BTW, I am on Slackware64-13.1 (stable). Currently, I am trying to copy all my music CDs on a harddisk. I thought, this would be a very simple thing to do, but whatever I do I run into another issue.


View 14 Replies View Related

Fedora :: Invoke 'skype' Using Command In Terminal Window - Error Message Set Out On Attachment

Jan 13, 2011

I am able to invoke 'skype' using the following command in a Terminal window. < export XLIB_SKIP_ARGB_VISUALS=1 && LD_PRELOAD=/usr/lib/libv4l/ && skype & >. I want to be able to enter it through the Gnome Application interface. I right click on the skype icon and went to properties and added the above code. When I click the icon I get the following error message set out on the attachment? properly enter the commands within the application Command: line?

View 2 Replies View Related

Ubuntu Networking :: Some Command Line Way / Where Can Invoke Nautilus To Mount Windows Share

Oct 9, 2010

My computer is connected to the college lan where almost all machines are some variant of Windows OS. If i use Places > Network, while windows network is displayed, mostly it returns unable to mount shares, my workaround for this problem is I use some tool like nbtscan to see which hosts are up and then use network > Connect to Server > windows share and type in the ip address, this mounts the windows share even though Places> network doesn't display such hosts. My question is there some command line way where I can invoke nautilus to mount the windows share, ie the same job connect to server > windows share does? And is there some application like say lan surfer for windows which lists all the folders shared by a windows client.

View 3 Replies View Related

Debian :: Methods For Changing The GRUB-PC Background Image?

Mar 26, 2011

After much searching and trying of more complicated methods for changing the GRUB-PC background image, i found method that seems to work. The simplest one! I installed grub2-splashimages, which created a new folder in /usr/share/images, called grub. From there it appears to be as simple as adding the image of your choice, then adding "GRUB_BACKGROUND=/usr/share/images/grub/your_image" to "/etc/default/grub" file, the running "update-grub", of course.

Only problem is it doesnt work for the image i really want. So my question: What qualities should an image have if it is to be successfully used as a GRUB-PC (GRUB 2?) background? I have read that you do not need to resize the image anymore, indeed i tried resizing it to match the size a default image form the "/usr/share/images/grub" folder , and saving it with the extension .tga in Gimp and it did not work. The image i want to use is quite large, it is also black and white/grey-scale and in the .png format.

View 14 Replies View Related

Copyrights 2005-15, All rights reserved