Software :: Complex For Loop Executed Remotely Via Ssh?

Nov 2, 2010

I've got a fairly complex bit of code (a for loop within a for loop) which I'm trying to execute remotely, however because of the special characters this exits without making the connection.Usually I'd do:ssh root@ipaddress "for i in `cat /etc/hosts | awk '{print $2}'`; do ping $i; done;"But given the complexity of my code this usual tactic doesn't work

View 3 Replies


ADVERTISEMENT

General :: Check Weather A For Loop Has Executed Properly ?

Jul 13, 2010

I want to check weather a for loop has executed properly

Code:
for name in `awk -F: '{printf " "$1}' /etc/passwd`;do
echo $name;done
[ $? -eq 0 ] && echo "SUCCESS" || echo "Failed_to_fetch_the_user";

Every time this gives output as SUCESS even If I change /etc/passwd to other file name.

How can I resolve this ?

View 4 Replies View Related

General :: For Loop Or While Loop To Read The Fields Of A File?

Sep 1, 2010

I have a mytext file with month and year as two separate fields. likemytext fil

08 2010
09 2010
10 2010
........
........
........

I want to read the values of each field i.e., month and year into an awk script.

View 10 Replies View Related

Ubuntu :: Remotely Wake On Lan - Remotely Turn On Computer

Jan 4, 2011

Does anyone know or recommend some software or a script to remotely power on a PC from standby to on, or even better from completely off?

I guess the completely OFF to ON is much more complicated - would probably require an extra piece of hardware(?)

View 2 Replies View Related

Networking :: Remotely Login To Remotely Display Data?

Jun 29, 2011

I'm not terribly new to Linux, but I am new to the forums, so hear me out! I am in the process of creating an electronic mapwall for our meteorology program, and have designed the computing system from scratch. I have two Linux Boxes, each with capabilities for 6 attached monitors...a total of 12 displays driven from two machines. My intention is to have one machine be the master...it has a touchpanel control. The inputs to the touchpanel will then trigger events for the both the master and the slave machine to display. Each of them has a specific IP address (DNS entry), and are not on a subnet.

Now...is there a way to remotely login to the slave machine and have it display on it's OWN monitors? The code is Java and which works on the master machine to animate directories of .gifs for each of the master's attached monitors. I will most likely have Java execute shell commands for the remote login (ssh), but I believe the answer lies somewhere in the X-configuration. Do I have the machines in an adverse configuration (creation of a subnet would be better)? Lots of questions...lots of desire...few answers!

View 2 Replies View Related

General :: Awk Paragraph In Complex Text File?

Sep 23, 2010

I have a simple log file which is very messy and I need it to be neat. The file contains log headers but are all jumbled up together thereforeI need to sort the log files according to the log headers. There are no static number of lines that means that there is no fix number of lines for the each header of the text file. And I am using AWK to sort out the headers.The Log files goes something like this:

Code:
Car LogFile Header
<text>

[code]...

View 1 Replies View Related

General :: How To Awk Paragraph In Complex Text File

Sep 24, 2010

I have a simple log file which is very messy and I need it to be neat. The file contains log headers but are all jumbled up together therefore I need to sort the log files according to the log headers. There are no static number of lines that means that there is no fix number of lines for the each header of the text file. And I am using AWK to sort out the headers.

The Log files goes something like this:

Code:
Car LogFile Header
<text>
<text>

[Code]....

View 1 Replies View Related

General :: Using Echo To Create A Complex Script?

Sep 16, 2010

We're going to be doing a rather large server deployment, and using the provisioning system we have in place there is no current way to just "copy" a file over to the servers. All files/scripts have to be run from the provisioning server.Due to network constraints, the provisioning system can't run a script we need to run (requires certain network assets to complete, but as soon as we modify the network settingshe provisioning system loses access to the server and can't run the script). So,our network configuration script to create the other script on the server in /root when it runs.My original method was to do something along the lines of:

Code:
#network configuration statements here
....

[code]...

View 2 Replies View Related

Programming :: Replace A Complex Line In Lvm.conf

May 19, 2011

I need to replace a line in the lvm.conf file from: filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/" ] to: filter = [ "a|/dev/cciss/c0d0.*|", "a|/dev/disk/by-id/.*|", "r|.*|" ] And I was hoping there was a way to use sed or awk to do this in a script (as I need to repeat this on several machines).

All of the examples I've found don't see to work with all of the special characters in the line that I need to replace. Then I need to add a line after the above edit like this: types = [ "device-mapper", 253 ]

View 3 Replies View Related

Ubuntu :: Possible To Use Piped Command As Opposed To An All Out Complex Method

Dec 1, 2010

I would like to keep this simple and if possible use a piped command as opposed to an all out complex method.I have a script that does many things for me, and one of them builds a basic simple system report (I know about lshw, but this is for me to learn as well as be functional)

I would like to add another pipe to remove the"model name:" portion.I do not really want to use the store in a variable first solutions if I can help it.

View 7 Replies View Related

General :: Download 'complex' Links Via Command Line?

Feb 3, 2010

I'm not sure how to explain my situation. I would like to download the file <https://www.vmware.com/tryvmware/p/activate.php?p=free-esxi&lp=1&ext=1&a=DOWNLOAD_FILE&baseurl=http://download2.vmware.com/software/vi/&filename=VMware-VMvisor-Installer-4.0.0.Update01-208167.x86_64.iso> via the command line. I've tried a few different methods with wget, the best I get is an index.php file. I'm not at all familiar with php but a search for "wget php" yielded nothing helpful.

View 3 Replies View Related

Networking :: Moderately Complex Netowrking Setup Not Working?

Jan 26, 2010

My network looks like the following:

WAN (cable)
|
|

[code]...

View 6 Replies View Related

General :: Delete Files With Complex Filenames With A Script?

May 24, 2010

I am trying to write a bash script to delete a file where I know the first part of the name, but it has spaces in it. The second part of the file name is a random set of characters. I was hoping to use a wildcard for this, but I keep getting a error massage saying file or directory does not exist. This is a simplified form of my script:

Code:
MYFILE=This is my file
rm "$MYFILE*"
The file may be something like "This is my file.123abc456.suffix"

View 14 Replies View Related

Software :: Complex Sound Volume Scale In A New GNOME

Jul 11, 2010

I've tried a new Ubuntu 10.04 and Fedora 13, both o them have gnome >= 2.30. In them, alsamixer says default sound device have only master volume slider. When I changed device to "Intel HDA ..." it shows all the sliders (Master, PCM and other). I saw changes in the default master volume causes changes in both, Master and PCM scales. Is there anyone know how to make gnome sound volume hotkeys leave the PCM slider alone? I need it for my personal tasks.

View 3 Replies View Related

Programming :: Complex Math Calculation In Shell Script?

Feb 16, 2010

Here is my situation:I have a series of .plt files that are geared for a device that has it's xy origin at the lower left of the paper however some devices use the center of the paper as it's origin in a piped shell script how can I convert this file to a center origin plot file?Here are some knowns: the existing file always Lower Left 0.0 the existing file max xy is the page upper right x.x the desired output file must have it's 0.0 at the exact center of page (page size will vary). Ideas: Based on the sample files included maybe use PU and PD as the triggers for inputs to be calculated as any other commands have nothing to do with coordinates.

View 14 Replies View Related

Networking :: Communicating On The Wireless Lan - Complex Usage Of Ssh Port Forwarding

Mar 5, 2011

I am having trouble with computers communicating on the wireless lan. However, if I ssh into the wireless access point and then ssh into another computer on the wlan, that works fine. The draw backs to that is I am restricted to only ssh and without X forwarding. So what I would like to do is set up ssh port forwarding so that computer2 with vnc server 5900 on the lan will be accessible through 40000 on mycomputer using the wireless router's ssh as the go-between with ssh port forwarding. How can I accomplish that? Every time I read about this, I think I understand it, and but then I must have done something wrong because it's not working the way I thought. I have successfully done ssh port forwarding in the past without using a third computer as a go between. Both the wlan access point/router and computer2 are running an ssh server.

View 1 Replies View Related

Debian Configuration :: Complex Network Setup - RPI To Automatically Route Internet

Jan 26, 2016

I would like to update my network setup.

Today, I have an ADSL box which is my gateway to internet (192.168.0.1).

I have a Raspberry pi (RPI) which I use as a dhcp & dns server (192.168.0.2).

Recently my mobile phone operator installed a 4G antenna beside my home, and the bandwidth and latency are much better with my mobile phone than with my internet provider (ADSL).

I would like to install a wifi dongle on my RPI (I would get wlan0 & eth0 interfaces)

When RPI detect my shared phone connection (tethering) I would like RPI to automatically route internet:

- from authorized devices on my network to my mobile connexion (wlan0 -> mobile phone).
- from other devices to the standard ADSL internet (eth0 -> ADSL box).

I don't want any device to use the shared 4G connexion, best would be authorized devices to be selected by MAC address. How I should properly setup such a network ?

View 2 Replies View Related

Programming :: Change Complex Number Display Mode (like -123.45e67 In To Real)?

May 9, 2011

How to change the complex number like -123.45e67 in to real number.
with command of awk print

View 1 Replies View Related

Fedora Installation :: Multiple Language Support (including To Enter Complex Characters)

Jun 10, 2009

I quit using Fedora when FC4 came out, but I decided to switch back now that F11 has come out. I'm liking everything so far, though it is different from what I became used to (Ubuntu). My main question so far has to do with language support, and I cannot seem to find an answer anywhere for this. I need to have language support for several languages (including support to enter complex characters) for all applications for which it they are available. How do I install all the language files at once for, say, Korean, rather than installing each library one by one?

View 6 Replies View Related

OpenSUSE :: Good Documentation About Expect - Build Complex Script - Work To Automatically Connect To 50 Pc`s

Aug 20, 2010

I was wondering if you could help me find a good documentation about expect, I have searched all the web but with no luck. I need to build a complex script that I need at work to automatically connect to 50 pc`s (with linux based os) and execute 10 or more script with the output into a text file and the email the file to my email address.

View 3 Replies View Related

General :: Copy A File With Certain Name Pattern For Which Exact Place In Complex Directory-structure Unknown?

Sep 19, 2011

I want to copy all files with the name XYZ* into one folder. The problem is that the files are in different subfolders and that not even the depth of the folder structure is the same for all files. Luckily, at least each file has a unique name.

Of course, I thought about the cp command but I guess the depth of the folder structure needs to be the same for this to work.

View 3 Replies View Related

Fedora :: Where Is Xorg Executed From

Dec 8, 2009

I need to add -audit to the process /usr/bin/Xorg :0 -nr -verbose -auth /var/run/gdm/auth-for-gdm-MTmpH6/database -nolisten tcp vt1

And have added -audit to the line in /etc/X11/xdm/Xservers but with no luck. I can't seem to find where this thing is getting launched from!

View 1 Replies View Related

Fedora :: Can't Get Any Of Page Executed

Oct 19, 2010

i have install php and make proper confgiuration as said in various books and forums.but |all what i gotis just blankpage which means it knows that thereis the file at given folder but it cannotexecute.

View 1 Replies View Related

General :: When Was Script Last Executed?

Jan 18, 2011

I have a script scheduled to run with Crontab at 5am each weekday.The script is all good and executes manually (is just a simple stop/start of a service)I have reason to believe that it is not executing according to schedule.I am looking to see when a script was last executed.The script is executing accordingly (long story short, I forgot it was Tuesday). I would still like to know how to check a last-execution time.

View 1 Replies View Related

General :: Which Script Gets Executed?

Jun 16, 2010

How can I find out which script runs and automatically mounts any usb drive inserted? This script seems to be faulty because it fails on ext3 disks but functions fine on NTFS or HFS+ disks. If I can find out which script it is maybe someone can help me fix it?

View 14 Replies View Related

Debian Configuration :: Script Is Not Executed

Oct 23, 2015

I'm using debian jessie and I use lightdm..and I created a script in "/etc/X11/Xsession.d/canberra", with this contents:

Code: Select allif [ -z "$GTK_PATH" ] ; then
        GTK_PATH="/usr/lib/gtk-2.0"
else
        GTK_PATH="$GTK_PATH:/usr/lib/gtk-2.0"
fi

[URL] ......

Login to my user account the variable "$GTK_MODULES" is empty....

View 9 Replies View Related

Ubuntu :: Etc/rc.local Not Executed On Startup?

Apr 12, 2010

I usually set the transfer rate for wlan on start up because I dunno any other way of doing it. I find it weird that every other ubuntu versions can do rc.local at startup, even 9.10 xubuntu, but it didn't work for ubuntu.

how can I get the computer to run the script on startup? I tried to google for the problem but I only seen people mentioning the problem not the solution.

View 8 Replies View Related

Fedora :: Startup Scripts Don't Get Executed?

Jun 22, 2010

I have this script that I want to be run on startup:

Code:
#!/bin/bash
#chkconfig: 5 80 20

[code]....

View 2 Replies View Related

General :: Script Is Not Being Executed During Shutdown?

Feb 5, 2011

why a script is not being executed during shutdown. I have a script in 'init.d' that works properly from command line. It also works fine at boot. My problem is that it does not execute at all on shutdown. I am using all the standard rc.d stuff for the script. Here are my LSB tags:

Code:

### BEGIN INIT INFO
# Provides: setwebpage
# Required-Start: $network httpd

[code]....

When I check the rc?.d directories, the appropriate links are there with the proper NN. This script has to FTP a couple of files to a remote server so the network is required and the script should be run very early in the shutdown process. However, the first thing the script does is send a message via 'logger' indicating it is executing with the 'start' or 'stop' parameter. The 'stop' message never shows up in the log thus I have to conclude that it simply is never executed.

View 8 Replies View Related

General :: .wav File Executed By Script

Dec 28, 2010

I have a .wav file that ask "what's is your name in a robotic/computer voice. Is there I way I can execute that .wav file to execute as the script itself ask "What is your name?" giving the illusion that the computer is asking the question?

View 7 Replies View Related







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