General :: Unidentified Error In Bash Script That Notepad ++ Is Not Catching?

Jun 24, 2011

I've been debugging the following script all evening and am now stuck...this script is supposed to ssh to a router, pull interface conf, 'cut' 3 pieces of info, and then print the results of 2 as well as the 3rd (after running a ping cmd on the linux box):

SCRIPT_CODE
#! /bin/bash
lb1="0"

[code]....

View 4 Replies


ADVERTISEMENT

General :: Bash Catching The Function Returning Value Into A Variable?

Mar 17, 2010

i am dealing with this problemI have a function

function Une {
...
return $some_variable

[code]...

View 6 Replies View Related

General :: (small) Bash Script - Catching Syntax Errors

Sep 9, 2010

I've been trying to find a bug in this test script, but haven't been able to so far. I'm not lazy, I promise...just new to Bash so am having a hard time catching syntax errors. I call the script with the option -disableVenusBld, and it still prints "Starting build", which it shouldn't be doing right?

[Code]...

View 1 Replies View Related

Software :: Catching Signed And Unsigned Integers In BASH?

Dec 30, 2010

Solving issues with signed and unsigned numbers in BASH.For a start, Yes, BASH is type independent � I know that. My problem lays in catching executables output into a BASH variable.My executables are not quite UNIX compatible, where returned values are 0 for OK, >0 ERROR. They return 0 for OK, >0 WARNING (only, so move on) and <0 ERROR (abort) instead.

Code:
// C++ BIN A
int main(){

[code]...

View 4 Replies View Related

General :: Catching Stderr From Dd Over Ssh?

Oct 1, 2010

this might be an interesting one for the bash scripting gurus. I seem to break my teeth on it. The mission:- do a dd over ssh to trasnfer an image to another host- capture the dd PID on the other side- send a USR1 kill signal to it- capture that output on the original host It goes wrong on the last part. This is what I have before that step:dd if=image.gz | gzip -d | ssh host2 "dd of=/dev/vg1/lv1" &PID=`ssh host2 ps aux |grep dd|grep lx05|awk '{ print $2 }'`when I do "ssh host2 kill -USR1 $PIDI get nice outputs to the screen. When I replace the first line with:dd if=image.gz | gzip -d | ssh host2 "dd of=/dev/vg1/l01 2>/tmp/output.txt" &the dd command seemd to die. I suspect a problem with the pipe, since this does work when executing locally on a host without piping.

View 4 Replies View Related

General :: Catching The Hibernate Event?

Jun 7, 2010

Is it possible to catch the power management events(hibarnate/standby/sleep)o the code(c++)?

View 2 Replies View Related

Ubuntu :: Unidentified Monitor Display?

Jul 7, 2010

I'm having some strange problems with my monitor. It's an LG Flatron L1730S and the graphics card is a Nvidia Geforce 5600FX. The monitor is listed as unknown in monitor settings and is going at 51 HZ with performance and out of range issues in some game. How can I get ubuntu to recognise it, or better yet change the driver?I did some googling and discovered a tool called displayconfig-gtk, but I can't install it in Ubuntu 10.04

View 4 Replies View Related

General :: Use Notepad++ On RedHat Machine?

Jan 15, 2010

I want to use Notepad++ on my RedHat machine. But there is no setup file available for Linux. What should I do?

View 1 Replies View Related

General :: Notepad++ Installing Using Wine In 9.10

Feb 3, 2010

I have installed wine in my computer (ubuntu9.10) , then restared my computer. then i downloaded the npp.5.6.6.Installer.exe from the web, and double clicked it : there was an error message :::::

[Code]...

View 8 Replies View Related

General :: Text Editor Vs Notepad

Mar 24, 2010

re: lock file on an access database.i can see an .ldb file fine with windows notepad but cannot see the .ldb file in ubuntu's text editor. Its just messy text of symbols and letter. is there a way to view these files from ubuntu ?

View 13 Replies View Related

General :: How To Install Notepad++ Via WINE On Ubuntu

Dec 14, 2010

Firstly, I'll say that I have scanned the internet far and wide and am not looking for the responses that many new linux users with an affinity for notepad++ almost invariably received... "use this linux based INE or this one or download plugins for this other one"... No, sir. I miss notepad++. I moved to linux land, (exiled from windows for having an expired VISA) and I'll do anything to get her to move here with me.

I downloaded the npp.5.8.5.Installer.exe... I have wine installed... I have no idea what directory or where in god's name this .exe exists or if i have to query wine or what.

I'm also going to want to install itunes as well. That's not as important, but if the commands are similar I figure I might as well aim to request the killing of two birds with one.

View 2 Replies View Related

General :: Finding A DUMB Notepad Equivalent?

Mar 21, 2011

Why isn't there a simple program like Microsoft Windows' Notepad? One which is format stupid (ASCII only), so I can over-ride hidden html character entities. The other day I found myself wasting hours trying to get the Xephyr to work by cutting and pasting the terminal instructions from the following website into a gnome-terminal session - but each time it would give me the same, small window. I tried copying the text from the browser (using copy and paste) to gedit, but gedit was not showing the hidden character entities from the html code. After all this lost time trying different resolution sizes, I became suspicious that something was interfering with my cutting and pasting between gedit and the CLI terminal. Sure enough when I compared the webpage source code it gave me the clue to the problem.

From the same page - two examples:

Hidden character (notice the '�' or × )
$ Xephyr -ac -screen 1280�786 -br -reset -terminate 2> /dev/null :2 &
NO hidden character (notice the 'x')
$ Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &

[code]....

I even tried cutting and pasting out of the terminal yet somehow it retained the hidden characters. I could not find any preference setting in any of these programs which would allow for either eliminating the hidden characters doing a cut and paste or at least revealing them. I would like to plead to programmers out there for this basic functionality...

View 9 Replies View Related

General :: Edit Menu.lst In Windows Notepad?

Jun 3, 2010

I downloaded Grub4DOS and tried to edit the default menu.lst but it's all on one line and has a bunch of blocks □□□ between the commands. How do I properly edit this file in windows?

View 7 Replies View Related

General :: Bash Error - Syntax Error Near Unexpected Token `{

Mar 4, 2010

I am new to shell scripting, bash specifically.

I am trying to run the following script:

Code:

When trying to execute I always get this error:

Code:

In case you need to know the permissions. Here is it:

Code:

I run the script using the following command:

Code:

View 1 Replies View Related

General :: Save URL From Browser In Notepad Through Shell Script?

Jan 24, 2011

Is there any way to 1) write a script to save only the URL opened in a multiple browser and multiple tabs to notepad.2)how to open multiple URL in browser tab through shell script.

View 1 Replies View Related

General :: Error Propagation Not Working In Bash

Mar 14, 2011

when ever some error happens in the functions, they are not propagated and err_out function is not called.I tried #!/bin/bash -E too; that way when there is an error the script exits but what I need is error to be propagated properly to the handler.

View 1 Replies View Related

Programming :: Catching The Output Of 'split'?

Mar 10, 2010

How do I catch the output of split and redirect it to another directory?for example,if my working directory is 'Documents' and I split a file called text.one into 4 files of 100 lines each (xaa, xab, xac, xad), how would I get those split files to be written into 'Directory/subdirectory' instead of 'Directory'?And is it possible to rename those split files so that the split name is suffixed with the original file's name e.g instead of xaa, xab... can they be written as text.one.xaa, text.one.xab..?I've thought about using '>' to send the output to a new directory but it doesn't work; and I've thought about piping the results to another command but I don't know what that other command should be.

View 2 Replies View Related

General :: Bash - Syntax Error Near Unexpected Token `('

May 2, 2010

I am trying to install vlc media player on my backtrack3 but when i am giving a command xvjf to extract bz2 file then

bash: syntax error near unexpected token `('

View 1 Replies View Related

General :: Bash Prompt / Looks Fine Initially, But There Seems To Be A Hidden Error?

Jun 1, 2011

I've written custom prompts for several boxes but this one has an error I just can't identify and need a second set of eyes to help solve it.

I've set the following as my prompt: PS1="[e[30;42m]u@h[e[0m][e[30;47m] #][e[0m][e[32;1;40m]w>[e[0m] "
(hostname/un obscured & image enlarged slightly to make it easier to read.)

Everything looks fine initially as you can see here:url

1- It sets the username@host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, changes to a green on black font and prints the working directory.
4- Finally is prints a ">" character and a space.

The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying as you can see in the following composite screen-shot

url

Here I did a simple ps and piped it through grep. After getting the output, I up-arrow to repeat the command. As you can see by the second section the cursor only goes back to the "s" in ps. The "p" can not be deleted. Hitting enter just displays a new line, so the "p" was just a ghost being displayed and not really there.

View 2 Replies View Related

Fedora Servers :: Catching The Spam At The Sendmail Level

Oct 16, 2009

I'm running FC10, with the sendmail that was part of it in Feb 09. Anyway, Up till now I've been using the user client to do spam filtering, But I'd like to start catching the spam at the sendmail level. What are my options today? I tried searching the forums and found a bunch of threads from 2001-2006, but I figured many of the ideas are now longer vaild.

View 2 Replies View Related

Programming :: Catching Multiple Signals In A Single Handler In C?

Apr 26, 2011

Is it possible to handle multiple signals in just one handler? I only know singal() catches one signal at a time

View 2 Replies View Related

CentOS 5 Server :: Spamassassin - Amavisd Not Catching Spam

Jul 21, 2010

I followed this how to document [URL] to install postfix, Amavisd, SpamAssassin and ClamAV. My postfix installation is working fine and I can send and receive emails fine. However, it looks like SpamAssassin is not catching any emails. Emails do get passed over to Amavisd as I can see in the logs but ALL Messages comes out CLEAN without being tagged as spam.

As per the document, I did test by sending a test virus email

sendmail -i your-address@example.com < sample-virus-simple.txt.

This is caught and NOT let through so ClamAV is ok but when i send

sendmail -i your-address@example.com < sample-spam-GTUBE-junk.txt

it does get delievered without being detected as SPAM or tagged as SPAM.

As I said, I have followed the documentation dot by dot and hence do not have spamassassin starting up as a service but i guess amavisd starts it within itself as a module.

Also, my postfix version is the one that supports mysql virtual tables which I got from rpmforge.

View 6 Replies View Related

General :: Bash - Links -command Not Found - Error In Apache Server

Nov 6, 2010

I am using rhel5 with ip 192.168.0.254.i am using rhel on vmware 7. when i run links 192.168.0.254 then i got error "bash : links : command not found" i want to know why this error is showing? when i use red hat without vmware then there is no problem.

View 2 Replies View Related

Fedora :: Installing The Notepad++ In F15?

May 29, 2011

I am familiar with notepad++ Is it possible to install notepad++ in F15? Or is there any similar application?

View 8 Replies View Related

Ubuntu :: Install Notepad ++?

Dec 14, 2010

Is it possible to install notepad ++ on Ubuntu? If so how would I install it. I want to use it for scripting.

View 8 Replies View Related

Ubuntu :: Create New Directory But Keep Getting Same Error - Bash: Syntax Error Near Unexpected Token `newline'

Jan 13, 2010

I'm trying to create a new directory using the mkdir command.

Code:

home@ubuntu:~$ mkdir <aicoursework>
bash: syntax error near unexpected token `newline'

that's the error that i keep getting, what am i doing wrong?

View 5 Replies View Related

Ubuntu :: ERROR --bash: Syntax Error Near Unexpected Token 2

Feb 4, 2010

The following problem occurs to me, I'm creating a distribution (as a class project) for my school (I'm studying telecommunications and computer systems). I am following, in order to create the distribution, the manual that you can find on this page: [URL] But when I get to write:

[Code]...

View 3 Replies View Related

Ubuntu :: Using The Notepad++ For Text Editor?

May 3, 2010

I would like to use notepad++ for my text editor. Is there away to get this only my Ubuntu 10.04 Netbook?

View 5 Replies View Related

Software :: Text Editor Like Notepad++

Aug 30, 2010

I am trying to find text editor program similar to notepad++ but for linux. I am with debian, and I only headr about BlueFish or something. I want to be able to change languages like in notepad++ and the program automatically to highlight some words. I will use the program mainly for php, sql, etc.

View 9 Replies View Related

Ubuntu :: Finding A Notepad That Runs In Terminal?

Apr 5, 2010

I,m looking for a notepad type that runs in terminal? i,e when I (ctlr alt f1) I have terminal can you run a notepad within that, or is there a way to type something then be able to save etc

View 9 Replies View Related







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