General :: SU Results In Cannot Execute Bash

Feb 13, 2011

SU results in Cannot execute bash: No such file or directory.

View 1 Replies


ADVERTISEMENT

General :: What Do Various Colors In Results Of Bash Ls Signify?

Jan 12, 2011

I am at the moment using Ubuntu 10.10 with the default color scheme. If I open a bash terminal and type ls -l / I get the results with most information in white on the standard purple background, most directory names in blue on the normal background, tmp in blue on a green background, a file name in white on the normal background and links in teal on the normal background.

So in this situation I am wanting to figure out what the green background behind tmp signifies. I have searched for information about bash color codes and I find hundreds of links regarding how the CHANGE the colors. I have yet to find one which explains what the colors mean.

View 3 Replies View Related

General :: Why Does Perl Execute Bash Scripts

Mar 23, 2011

I'm playing with perl and found that I could just go:

"perl /home/me/bash_script.sh"

and it would execute, even though it's not a perl script. Is that just a feature or is there something I'm missing? Why does perl do this?

View 2 Replies View Related

General :: Execute Three Processes By One Script In Bash?

Jun 29, 2011

how to execute three processes by one script in bash.........in linux

View 1 Replies View Related

General :: Execute Bash File - Always Back To Home Dir?

Apr 11, 2010

In my bash file I have asked to navigate to some subdir, unzip a file and stay there but when I type pwd I can see i'm always back to home dir.Any way to get shell stick to subdir?

View 4 Replies View Related

General :: Unable To Execute Simple Bash Scripts ?

Dec 24, 2010

All of a sudden,i can't execute a simple script as follows:

exit 0

and:

exit

View 18 Replies View Related

General :: -bash: /usr/sbin/amrecover: Cannot Execute Binary File

Jun 8, 2010

I just installed amanda-backup_client-2.6.0p2-1.rhel4.i386.rpm on my Red Hat Enterprise Linux 4 system. But I don't know who to check if it successfully installed or not. When I try to run amrecover from root, I get:

-bash: /usr/sbin/amrecover: cannot execute binary file

View 4 Replies View Related

General :: Executable File Apparently Doesn't Exist When Trying To Execute With Bash

May 9, 2011

I downloaded a program called tonespace http://www.mucoder.net/en/tonespace/ which I extracted and then tried to execute the executable file with ./tonespace. This gives me the following message:

bash: ./tonespace: No such file or directory

When I use the command: file ./tonespace I get this: tonespace: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped

I dont get it. The file is clearly there, yet when trying to execute it bash doesn't seem to recognize it.

It has permissions rwxr-xr-x and is not owned by root. Am I overlooking something?

View 2 Replies View Related

Ubuntu :: Bash - Open Mlocate Search Results?

Mar 22, 2011

Upon a while of searching, I think I failed to find the correct terms and I'm posting here. I often use mlocate to search for files. For example, if I say

Code:

$ mlocate temp_2.pdf

I'll get two results:

Code:

/home/kmc/Documents/latex/temp_2.pdf
/home/kmc/Documents/latex/test/temp_2.pdf

Now if I want to open one of them, I'll have to either open Acroread and browse to their locations. Or select and copy, and call acroread in terminal like

Code:

$ acroread /home/kmc/Documents/latex/temp_2.pdf

This is tedious to me. I'm thinking of a way of quickly open its search results, I've tried pipes like this but it doesn't work:

Code:

$ mlocate temp_2.pdf | acroread

maybe it doesn't work this way. So what does the trick? What's the name of this trick? I've googled for

Quote:

Linux bash catch output, pipe output, open mlocate results And is it possible to handle multiple lines of output, e.g., can I choose which line of output get forwarded to relative programs?

View 9 Replies View Related

Programming :: Looping Over Mysql Query Results In Bash?

Sep 15, 2010

I am querying a single string column in a table. The string values have spaces in them. I want to loop over each value in bash. I set IFS to split lists on newlines instead of spaces. When I try this, it is splitting the list of results on the actual character 'n', not the newline ''.

DATA=`mysql -u root -ppassword --silent 'SELECT name FROM table_a;'`
IFS=$'
'
for i in $DATA; do
echo "item = $i"

[Code]....

View 5 Replies View Related

Programming :: Bash : Searching For Info And Changing The Color Of Keywords In The Results?

May 5, 2011

(bare with me as I am sort of new with scripting) I am trying to figure out how to run a script that does a basic chkconfig and to get only those services that are running, but changing the color of "on" to red in my output file. Here is what I am working with so far:

Quote:

#/bin/bash
RED=$(tput setaf 1)
BLK=$(tput setaf 0)

[code]....

*I had to substitute a "-" and <colon_symbol> for ":" in front of the on's, because the forum thought they were smiley faces (i.e. n) how to make the "on" to be red while the rest of everything remains in black text. I have been trying to read up on sed and awk, but it is still pretty much a mystery to me right now. There will be other things in the output file that I wouldn't want a rogue "on" to be in red, so just the instances of "on" in that one chkconfig return.

View 4 Replies View Related

General :: Saving The Results Of The Time Command While Discarding The Results Of The Command Being Timed

Apr 6, 2010

I'm timing how long it takes to run a command foo. I'm looking to append the results from the time command to a file, and discard the results from the foo command. I tried the following, but it didn't do what I want:

$ time ./foo > /dev/null >> output_from_time_command.txt

View 1 Replies View Related

Programming :: Execute Bash Script In C?

Jan 31, 2009

I want to execute a bash script in a C program. Bash script return some message and I want to store this message in a C program. Anybody know how can I do it.
I know I can use 'system("bash myscript.sh")' command in C. But I want to store the message which script return.

View 7 Replies View Related

Server :: How To Execute Bash Script From Web Page

Mar 26, 2010

What i want to achieve si simple (i think).

I have this shell command:

Code:
echo -e 'ka 0 00
' > /dev/ttyS0
and i want to execute it from html or php with a button maybe or a link.(it's a command to turn off the monitor)

I am running Ubuntu 9.04 desktop with apache and php installed .
already searched the forum but didn't find/understand how to achieve this functionality.

View 14 Replies View Related

Software :: Way To Execute Bash As Interactive And Run A Command?

Jun 20, 2009

I'm trying to start bash with a command and have it interactive like this:bash -i -c "echo Welcome!"As in, execute the command and allow me to use it as an interactive shell afterwards. (I'm doing something more complicated than echoing, but this doesn't work.)I've tried this from a running gnome-terminal, from one gnome-terminal to a new one withgnome-terminal and from the Alt+F2 program launcher (with "Run in terminal" ticked).

View 6 Replies View Related

Programming :: Using Bash Command To Execute Output Of Awk?

Mar 24, 2011

I am trying to process a column separated data file, with a few bash command. For example, I have

Code:

file1 aaaa yes
file2 aaaa no
file3 bbbb yes

Let say I want to create new file with the output of first column and do something else with the output of 3rd column. Of course there are many ways to process this data file, but I wish to know by using awk, how could I do it. I'm trying:

Code:

awk '{system("touch $1")}' datafile

but the shell command will not able to get the awk '$1' output. How do I get this done ? And for another question, if the data file contains the variable name of a shell variable, how could I make use of it during a awk output ? For example I have a datafile1:

Code:

server1 yes
server2 no

And in another server declaration data file, I got this datafile2:

Code:

server1=xxx1
server2=yyy1

And in my awk script, I want to achieve something like (the syntax is definitely wrong, just to demonstrate what I assume it will like):

[code]....

View 12 Replies View Related

Ubuntu :: Execute Bash Script After Running Process Finishes?

Jul 28, 2011

I have a computation going which takes a long, but uncertain, amount of time. I have another computation which needs to be run, but _after_ the first one is done. I won't be at the computer at that time to manually start the new process. I've done some Googling, and I found how to delay execution by a specific amount of time (e.g. "start process x in exactly 8 minutes from now), but that isn't quite what I want to do. Essentially, I'd like to tell the shell, "When process #nnnn finishes running, then start process x". Is there a way to do this?

View 6 Replies View Related

Security :: Bash And Python Scripts - Encrypt Them But Still Be Able To Execute Them Encrypted?

Aug 24, 2010

I have some bash and python scripts. Is there any way to encrypt them but still be able to execute them encrypted?

View 7 Replies View Related

Programming :: Running More Than One Script In A Bash Script And Piping Results To SSH?

Jun 8, 2010

how to set the subject of this up.. but here is what I am trying to accomplish (please keep in mine, this is only my first month playing with ANY Linux programming): My shared web host limits running 2 CRONS or 2 SSH sessions at one time. I need to run more than that.. So, my solution is to run what I need on my home computer, and then push all the results via SSH to my web server.

To keep things timed, I am trying to call 4 bash scripts from inside of 1 bash script... Each bash script has variables I need to export out to the remote (web) server. Being that I can only run 2 SSH or 2 CRON sessions on the remote, it wouldn't do me any good to open up CRON or SSH remotely or locally - either way I'm maxing out. That is why I would like to call 1 final script that takes the output of the 4 bash scripts and does the job.

Main bash calls via CRON every 30 minutes:

Code: ./script_1 &
./script_2 &
./script_3 &
./script_4 &

[code]....

I need to scp the file saved by wget to the remote server. I also need to pass the SQL statement generated in each script as a command in SSH. I'm lost how to get the info from "script_x" into a string that can be used to SSH - and doing this all inside of ONE SSH command. Would I store the SQL strings in a file and call that in the SSH command line?

If so, what is the command to make sure the variable output in the "script_#" file is sent to a file? Can I call the variable from the main Bash Script? Now - the good news is, I can SSH from my local machine to the remote one.That is about as far as I got.Again - I am so new to this that my ears are still wet. This has been something I have been working on for a while, and I'm just lost at this point.

View 2 Replies View Related

Ubuntu Servers :: Bash In 10.04 Server - Every Empty Line In The Script Results In "command Not Found"

Oct 8, 2010

Bash acts weird in 10.04 server. Whenever I try to run .sh scripts, every empty line in the script results in "command not found". Then on even simple scripts I get syntax errors, but the same exact scripts work on my 9.10 desktop installation. There's also another problem, I'm not really sure if it's bash-related. After setting the proxy using

[Code]...

View 5 Replies View Related

Ubuntu Servers :: Apache - Execute A Bash Script That Uploads A File To Another Server Through A Website?

Sep 20, 2010

I have a web server in my kitchen with apache running on it. Since the upload speed is quite low due to my isp I would like to execute a bash script that uploads a file to another server through a website (which is htaccess protected) The idea in general: Someone with access to my website browses through a folder, copies a file path to an input form and presses "upload". Rather than executing a bash script directly I could have a cron job running in background that finds the path and then uploads the file to the other server I have userspace on and is accessible via sftp/ssh. The file would be than erased later after a couple of days or so. That person would be able to access the file with higher speed some time later without logging in via ssh and doing all that manually.

View 2 Replies View Related

CentOS 5 :: Bash: /bin/grep: Cannot Execute Binary File CentOS 5.4

Jun 4, 2011

I am facing problem on executing commands like df -h,ls-l,grep etc in /bin.

it is showing below errors:--
----------------------------------------------------------------------------------
login as: root
root@220.226.102.217's password:
Last login: Sat Jun 4 11:14:20 2011 from 220.227.54.149
-bash: /bin/egrep: cannot execute binary file

[code]....

View 2 Replies View Related

Ubuntu :: BASH: Execute Next Command Until Another Command Succeed?

Mar 19, 2010

I have a big bash script ,its goal is to download movie one by one . But I often get into a problem: if this script is executed in cron,it often does not completely download the movie.I often find the movies it downloaded are several KB while the movie is actually 20MB.So I think it is because it did not wait for finishing one task ,and jump to download another.So I want to know ,is there a way to force the bash script to wait until one movie downloaded completely and then start to download another movie ?

View 8 Replies View Related

General :: Different Results In Du And Df?

Oct 29, 2010

I was checking /opt and then found something unusual. Below are the results of du and df -h,

Code:
$sudo du -h /opt/|tail -3
1.1G /opt/IBM

[code]....

View 2 Replies View Related

General :: Different Results From Vmstat And Ps?

Jun 24, 2010

I am trying to determine CPU usage on a radio controller running Linux. We have a script that another member of my work wrote using vmstat which I could not get any consistant results from. So, in an effort to understand what was going on I wrote a script using ps. Sadley after running several tests using both scripts, they do no match up at all, vmstat always gives me a much higher value. However, if I simply run the commands at any given time they do match up, therefore I believe that there is an error in one of the scripts. I am very new to linux and so Here is the vmstat script:

#!/bin/bash
declare -i total
declare -i tries

[code]....

View 11 Replies View Related

General :: 64 Bit - Different Commands Shows Different Results?

Jul 10, 2010

The system of my VPS is centos 5. I want to know if it is 32bit or 64bit. > uname -a Thu May 13 13:49:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

looks like 64 bit.
But
> getconf WORD_BIT
32
Looks like 32 bit.
Which is correct?

I believe the linux of my VPS is 32 bit. Because I downloaded a 64bit mongodb, found it can't start. And when I downloaded a 32bit instead, it works well.

View 3 Replies View Related

General :: When Using Grep From VIM, How To Jump To Results

Feb 22, 2011

When using the grep plugin to VIM, I can search the current directory for all occurrences of a string within a set of files, like this::grep Ryan *.txtThis outputs something like this:

file1.txt:3:Ryan was here
file2.txt:10:Ryan likes VIM
file3.txt:5:superuser.com is a fav of Ryan

[code]....

View 1 Replies View Related

General :: Why Does `du` Not Show Results For All Files

May 22, 2011

I (for curiosity's sake) am running du -a inside /usr/lib/git-core and it does not show results for all the files in that directory. Why does it leave out an arbitrary set of files?this is what cd /usr/lib/git-core; du -a returns:

4 ./git-merge-resolve
972 ./git-config
12 ./git-show-index

[code]....

View 1 Replies View Related

Ubuntu :: General, How To Exec On Ls Results?

Feb 10, 2010

Find a file and need to do something to it, think there must be a single line solution for:

$ ls *.c
$ cat *.c

View 1 Replies View Related

General :: Having Only One Instance Of Search Results?

Oct 6, 2010

having only one instance of my search results

View 5 Replies View Related







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