Programming :: Setting Var Returns Command Not Found?
May 7, 2010
I have the following function, and it appears to set the var correctly, but then tries and executes the line as a command. Anyone know how to keep it from doing that?
I'm trying to install the projectM visualizer and I'm running into some problems. Initially, I tried to install it by running "sudo apt-get install libvisual-projectm", which seemed to work... except there's no launcher for it in my Applications menu and "projectM-pulseaudio" returns "command not found". From there, I decided to try to build it myself, by following this guide (<- link). It went well until the "make" command, which returns the following error:
I'm trying to install Cinelerra because it has a plugin to do chromakey. I found a .deb and installed it, but now I don't know how to start the program. It didn't make a shortcut in my main menu, and typing "cinelerracv" returns "command not found"Did I install it wrong, or not at all? What should I try next?
i have a site where I need to run a couple of php scripts every day..therefore I was thinking to setup a cronjob to do this. Unfortunately I get a whole bunch of errors trying to do so.
I can execute the php scripts via a command line without problem, one example would be
I am a ham radio operator and I want to use my computer to run "RTTY", "PSK31", and other digital modes. Therefore I have to be able to configure the serial port.
I only have the onboard port (ttyS0).
I can get info about the port by using "$ dmesg | grep tty"
Code: Select alldebian@melsdeb:~$ dmesg | grep tty [ 0.000000] console [tty0] enabled [ 1.533804] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A [ 1.534337] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
But when I try to use "setserial" by itself or with any parameters I get this...
Code: Select alldebian@melsdeb:~$ setserial -g /dev/ttyS0 bash: setserial: command not found
Code:$ host 80.159.xx.xxxHost 222.79.xxx.xxx.in-addr.arpa not found: 3(NXDOMAIN)What does this mean? The person currently using the IP address in IRC is chatting right now, but how come if he's online it doesn't return any information?
Using zstyle, I can create a custom warning for messages and such, but looking into the man pages and all, I do not see anything for customizing actual error messages in ZSH, as such:
Code: casper@ltp01[/home/casper][19:14] - asdfsdafasdfjsdf zsh: command not found: asdfsdafasdfjsdf
I have written the following script in my linux server to add users for LDAP database.But i can't able to run this.
The script is as following
#!/bin/bash echo "Mention the username which you want to convert LDIF format" read username if ["$username" -e "/ldiffile/passwd"]; then echo "Username already exists" else cat /etc/passwd | grep -i "$username" >> /ldiffile/passwd fi The output which i got : . ldapadd.sh Mention the username which you want to convert LDIF format yal2361 -bash: [yal2361: command not found
I wonder if there is anyway to make a user-defined bash shell function global, meaning the function can be use in any bash shell scripts, interactively or not. This is what I attempted:
I have a service on my Suse 11 server which runs an ssh command (using openSSH) on another box.The output below is returned, but legitimate output is also returned as if the command had executed successfully. For example, the service executes an ls command through ssh, gets the error below, but also the contents of the remote directory as output. This is a problem because the service retries the command until it receives no error. I have been unable to replicate this manually from the command line. Does anyone know what might cause this or what this error really means?
I use the time command to measure the wall-clock time of a GPU implementation of an algorithm. When I time the CPU execution of the algorithm time returns a negligible sys time. However, when I time the GPU execution time returns a sys time that is around 20-30% of the total time. If that time was comparable with the negligible sys time of the CPU I would achieve a speedup of a few times higher.
I suspect that the increased sys time is because of the GPU usage, which, I assume, takes some time for the OS because of the drivers etc. I am not sure though, and it is important to figure this out because it will improve my results a lot if I can ignore the sys time and use just the user time for speedup calculations. Also, is there a way to see, in detail, what is the sys running and takes so much time. I am thinking that I might be able to see if it is the driver indeed that causes this delay.
I have a test socket on a server. If I connect to it using telnet, I get exactly the response I expect. So I know the socket works, and the script on the server works:
Code: my-desktop:~$ telnet 192.168.1.1 3333 Trying 192.168.1.1... Connected to 192.168.1.1. Escape character is '^]'. RAM: 90 % Free ( 2793 M free, 3082 M total)
Connection closed by foreign host. And if I script it, I get almost the same response from Telnet, but still a valid response from the socket. So I know that my script works:
I want to use ssh to execute a command and to wait endlessly to log everything (in file) that comes as a stream of the connected server. But unfortunately, in the manual its written "If command is specified, it is executed on the remote host instead of a login shell"
So what happens is that when I specify my command: ssh user@server "my_command"
It executed the command and the flow of execution returns to bash shell. So basically my session ends right after the command is executed. This happens only in case I specify command in the command line. If I login into ssh manually and then type "my_command", then the session doesn't end. I want the ssh not to exit, because after "my_command" executes, I want to capture everything in the session.
Why are basic math problems returning 0? I know that Integers can only hold whole numbers, and it had the exact same problem when I used floats. I am using GCC 4.4.4.
I am facing issue in my OPENSSL code. I have written openssl client. It sends request to the host and receives response for that request.
My problem is, it connects, sends request successfully to host at first time only in sencond attempt it fails on SSL_write(). where SSL_get_error() returns SSL_ERROR_SYSCALL error.
In that ERR_get_error() returns 0. man page shows "If ret == 0, an EOF was observed that violates the protocol".
Code Snippet. w=SSL_write(SSLRequestData.ssl,c2s,c2sl); switch(SSL_get_error(SSLRequestData.ssl,w)) { case SSL_ERROR_NONE: if(c2sl!=w)
I am now working with full installation instead of liveCD and I am having a very strange problem with lpadmin command.
When I type man lpadmin I get the normal text explaining how to use it. However, when I run the command "lpadmin -p <printer name> -v lpd://<server>/<queue>" I get "bash: lpadmin: command not found". It doesnt even work when I use sudo -E before command.
I'm studying the C Language, None of the documents I'm reading covers returning values from a function. They state that the function sends the valve to the caller but that is the only info I have. Do I have to create a varible with the name of the function I called and is it stored there?
I am working on software that is to run on a variety of linux machines where changing the os/version is not an option.My software uses the inotify_rm_watch call, and this is occassionally failing. In every case the operands are both valid, yet the result is EINVAL. This appears to only occurr when a watched file is deleted, and the read command on the inotify yeilds two events IN_DELETE_SELF AND IN_IGNORE (at the same time).I have seen a few messages detailing this same scenario - but no workarounds.
If I have a Query that returns columns where some of the values are NULL, is it possible to tell SQL to return all the NULL values as empty strings instead of the NULL datatype?
If the solution is vendor specific I am (unfortunately) using a Microsoft 2008 SQL server.
Example:
Code: Select * from imaginary_table where id = 1 Might return: Code: Id: 1 Name:xyz
I am running shell command through C program using system() routine.
I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory
But when I give the complete path to the executable it runs perfectly.
The executable is installed in "/usr/local/bin/" And the path variable has this path.