Ubuntu :: Bash: How To Make ${var%% *} Work

May 1, 2011

bash: how do you make the construct ${var%% *} work? I am trying to select the first word from a variable which contains many space-separated words. I am running Ubuntu 10.10 with GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) and when I try to use this construct, the expression returns the complete variable with no removal of trailing anything.

View 3 Replies


ADVERTISEMENT

Software :: Make Ctrl + Backspace Work In Bash?

Jan 18, 2010

I've tried without luck to get ctrl-backspace working to delete the previous word in bash. I edited my .inputrc and tried the following:

"C-": unix-word-rubout
Control-Rubout: unix-word-rubout

I can make it work if I change it to some other sequence (Control-j: unix-word-rubout makes ^j erase the word), but I can't make it work with backspace.

View 6 Replies View Related

Ubuntu Multimedia :: Creative Webcam Doesn't Work - How To Make It Work

Feb 17, 2011

how to make creative web cam working with ubuntu

View 1 Replies View Related

Ubuntu Multimedia :: Flash Controls Don't Work - How To Make Them Work

Apr 8, 2011

I can't get flash controls to work. If the video auto-plays, it starts just fine, if not, I'm out of luck. I've tried reinstalling flash through the software center. Even if it autoplays, I can't control volume or pause or anything. I'm at the mercy of whatever is already there.

Ubuntu Karmic 9.10 - all updated as of 1/2/2009
Firefox 3.5.6
On a Lenovo Thinkpad R400

View 3 Replies View Related

Ubuntu :: Compiz Doesn't Work - How To Make It Work

Jul 29, 2010

I'm having trouble getting compiz to work on my Laptop. It worked for a while and then I turned on Shift Switcher and a message popped up saying..."The new value for the button binding for the action Terminate in plugin Shift Switcher conflicts with the action Zoom Window of the Scale Addons plugin. Do you wish to disable Zoom Window in the Scale Addons plugin?" I was given the option of Set Terminate anyway, Don't set Terminate, and Disable Zoom Window. I clicked Don't set Terminate and ever since the only thing that works in compiz are the bindings in the general options. I've used synaptic to completely remove and then reinstall compiz but the problem persist. Something else weird, all of the changes I made are still there, even after complete removal, but they don't work?

View 2 Replies View Related

Ubuntu :: Hibernate Doesn't Work - How To Make It Work

Oct 29, 2010

When I try to hibernate, the computer just goes to a blank, black screen and doesn't turn off. I have to hold the power button to get it to shut down, and when I turn it back on none of the programs running before hibernation have been saved.

View 8 Replies View Related

Ubuntu :: Unity Doesn't Work - How To Make It Work

Feb 16, 2011

I just recently (about an hour ago) installed Ubuntu Netbook edition on my old laptop, and I was greeted with the message, that unity could not be run due to some sort of missing driver...fair enough, I was then greeted with the default Ubuntu desktop, I installed all my needed software (wine, google chrome) and installed the missing display drivers. I then rebooted the system, and once again I am stuck with the default desktop, and not the Unity interface. I checked the software center, and it says Unity IS in fact installed.. And yet I cannot make it appear. So now I ask you Ubuntu veterans. How do I make it work?

P.S. I wiped the system of windows, and the computer is an old HP Pavilion DV6000

View 2 Replies View Related

Ubuntu :: Need To Make Bash Script Files

Apr 16, 2010

I need to know what is the best method for teaching yourself how to make bash script files

View 8 Replies View Related

Ubuntu :: Make Bash Script Files?

Apr 16, 2010

I need to know what is the best method for how to make bash script files

View 4 Replies View Related

Ubuntu :: Make A Automated Build-script With Bash

Apr 13, 2010

I'm trying to make a automated build-script with bash but i keep getting different errors.

Code:

#!/bin/bash
gpg --import /home/epm/first_installation/config_chroot_sources_local.gpg
gpg --import /home/epm/first_installation/config_chroot_sources_packages-inl-fr.gpg

[code]....

View 5 Replies View Related

Ubuntu :: Make A Bunch Of Graphs Using Gnuplot From A Bash Script

Nov 14, 2010

I've been trying to make a bunch of graphs using gnuplot from a bash script. The tricky thing is that I have to divide values from two columns: Code: plot "results.csv" using 1:($4/$6) notitle with lp When this command is called from a bash script, the columns get mixed up with script arguments. how to make it read the column values like in the interactive mode?

View 1 Replies View Related

Ubuntu :: Bash - Make A Automatic Wordpress Installer Script

Mar 17, 2011

I'm trying to make a automatic Wordpress installer script. It's autmattically defaulting to the else.

[Code]...

View 2 Replies View Related

Debian :: Usb Stick Don't Work - How To Make It Work

Jan 14, 2011

I just installed Squeeze_di_rc1, whit gnome, when i insert any usb stick i recive how can i solve it?At the same times i tried to format in fat 16 with gparted but the result is the same.

View 6 Replies View Related

General :: Make A Bash Script Ask For A Specific Key?

Nov 21, 2010

I am attempting to learn how write bash scripts. I want one to ask for a specific key. For example, I want it to ask a question, then if it is like, y for yes, or n for no, it does a specific thing. I'm thinking it would be something like:

Code:

#!/bin/bash
echo "Are you a boy? y/n"
read -t3

View 14 Replies View Related

General :: Make A Bash Script Into A Daemon

Aug 7, 2011

i've written a script that will move some files from one directory to another, i dont know if this is the right place to ask but, this is on my ipod touch and i'm wondering how to make it run periodicaly

View 6 Replies View Related

Programming :: Make Bash Replace The Value Of A Variable?

Apr 18, 2009

I have a program I am writing where I have a for loop and I want to make it substitute the variable twice like:

for ((i=0;i<5;i++)) do
echo $"$i"
done

[code]...

View 3 Replies View Related

Fedora :: Make BASH Script Wait For A Few Minutes?

Nov 26, 2009

I'm using bash script now,and I want have a script that can do like this: first ,tell me it will shut down ,and then shut down.My script looks like this:

#!/bin/sh
/usr/bin/curl $stop_page
shutdown -h now

[code]...

View 4 Replies View Related

General :: Make Bash And It's Apps Automatically Resize?

May 29, 2011

I'm working in Debian, and I've noticed that when I resize my PuTTY window, the console inside isn't resizing to the new dimentions, so things like nano are running at 80xwhatever instead of the more useful 130xsomething that I've offered it.

View 2 Replies View Related

Programming :: Make A Automated Build-script With Bash?

Apr 14, 2010

I'm trying to make a automated build-script with bash but i keep getting different errors that I can't seem to figure out. Could anyone please tell me what's wrong with this package of build-scripts? I'm posting the main build-script and attaching the rest of the scripts in a compressed form. The errors mainly comes from the scripts in "/first_installation/usr/share/siem-live/init"

[Code]...

View 2 Replies View Related

Programming :: Bash Script - Make Sure All Files Have Certain Permissions

Jan 14, 2011

How can I iterate over all the files in the current directory to check for certain permissions? This is what I have:

Code: #!/bin/bash
for file in *.tar.gz
do if [ -r "$file" ]
then echo "$file is readable"
else echo "$file is NOT readable"
fi done

But this only checks that the current user has read permissions for each file. I want to check that the group "others" has read permissions for each file. How can I do this? Is there a built in function to check if a file has read permissions for the "others" group? Otherwise, I thought I might be able to use this:
Code: $ stat --format=%a file
744 And parse the output "744" and make sure the 3rd number is between 4 and 7 (since the octals 4-7 have read permissions for others).

View 2 Replies View Related

Software :: Make Craig's List Ad Notifier In Bash?

Jan 7, 2010

I have OpenSuSE 11.2, and I am learning Bash scripting. I was wondering how I would make a bash program, That I could have it check multiple craigslist sites [western mass, worcester mass, etc], e.g. in the Free category, and/or enter keywords, and have it update every 5 minutes, and then post the results somewhere, to a file, or even upload it to a server, or if it's even possible? (Kind of like the program "Ad Notifier for Craigslist") Would I have to do this in C/C++? If it has to be done in C/C++ It would have to be windows compatible preferably.

View 2 Replies View Related

Programming :: Bash : How To Make Firefox Open But Minimize

May 3, 2011

I am relatively new to scripting, but I was wanting to open a firefox window from a bash script, but have it open, then minimize. In the script, I have a single instance of: firefox & but is there a way to minimize it, versus have it displayed on the screen? I was wanting the command terminal to remain visible and it can't since the firefox window is open in front of it. I looked all over the place, including the man pages, but to no avail. I can make the height and width changes, but no minimize. Either that, or to be able to bring the terminal window back to the front automatically.

View 5 Replies View Related

Programming :: Make An Automated Build-script With Bash

Apr 14, 2010

I'm trying to make a automated build-script with bash but I keep getting different errors that I cant't seem to solve for various reasons. what's wrong with this build-script? I'm posing the main build-script and attaching the rest of the scripts in a compressed form. Buld-script link: [URL]

[Code]....

View 3 Replies View Related

Programming :: Make 2 Separate Arguments In 1 Bash Script?

Aug 31, 2010

This is what I have:

Code:
#!/bin/bash
#ascript.sh

[code]...

View 8 Replies View Related

Programming :: Make A Flawless Bash Alarm Script

Jan 12, 2011

I am not positive that this is the right subforum for this post. It is technically a programming question but I am not sure if this is the best place for bash scripting questions. Anyhow, I have been having trouble getting up in the morning. I am a pretty good morning person and once I am up, I am good to go. The problem is getting out of bed. Traditional alarms have just not cut it in the past; there is always an easy way to shut them off and go back to sleep.

Recentliesh, I decided to try to make an alarm script in bash that would be more successful in getting my lazy behind out of bed. I am a newbie bash scripter at best so my attempts have been very simple but have not cut it so far. Here are some examples:

[Code]....

The above script was the version of my bash alarm. It will not stop ringing until I input that ridiculous phrase. The big issue with this script was that I would input the phrase quickly and go back to sleep. It was however, much more successful than traditional alarm clocks. Another obvious pitfall was that even though control-c'ing the process would not work, the terminal could be closed and that would be the end of it. I'll get back to that issue. Here is my second attempt:

[Code]....

View 7 Replies View Related

General :: Make Simple Website In System Using Bash Scripting?

Apr 3, 2011

How to made a simple website in linux using bash scripting.

View 3 Replies View Related

Programming :: Write A Bash Script That Will Make Some Web Stats Reports

Jun 23, 2010

I'm planing to write a bash script that will make some web stats reports and I'm stuck on beginning because I don't know how can I read a directory content, put everything in a variable, compare the variable value with current date and go further.More specific ...

I have /var/apache/log/. Here I have access logs on date ( like access.log.24.06.2010.gz and so on ).

How can I do to automatically zgrep (in a bash script) last day .gz ??

View 3 Replies View Related

General :: Make A Bash Script That Automatically Delete The Home Folders?

Feb 15, 2011

I am administrating a lab in a university and every semester we need to delete all the home folders of the accounts for the next semester. I would like to make a bash script that does this automatically and having trouble with it. Note that I am writing my very first bash script. What I need to do is make a script to delete the following:

Delete everything in /home/$exp$num/$dir
when "exp" could be either "rt", "ic" or "sp".
"num" could run from 1(single digit) to 45 and dir is "profile" and "work".

This is what I tried to write:

Code:

#!/bin/sh
cd /home
for exp in "rt ic sp"
do

[code]....

What seems to be the problem is the reading of "$exp$num" as a joint expression.

View 4 Replies View Related

Software :: Bash Script Calling Make Files With CFLAGS Prepended?

Feb 6, 2010

Most all of this works when I execute it manually, but I cannot figure out how to get a bash script to execute it automatically.In this particular case, I am trying to build the xorg utilities. If I manually step through the process, prepending the commands with CFLAGS, LDFLAGS, etc, all of the packages build.So I created a bash script, test.sh:

Code:
#!/bin/bash
export INITFS=/initfs

[code]...

View 5 Replies View Related

Programming :: Bash - Ps - Psgrep And Read /proc/$pid Make Script Exit

Mar 22, 2011

I have not been able to write bash to use a PID file to ensure no other instance of the same script is running! All three methods I can think of to see if the PID in the PID file is another instance of the script make the script exit with a return code of 1 but the same commands run at the command prompt work as expected.

The first attempt was:

Code:

The first attempted workaround was:

Code:

The second attempted workaround (with debug to make the following command prompt copy and paste meaningful) was:

Code:

Here's the command prompt session, testing with a stale PID file and then manually running the problem command and it behaving as expected:

Code:

This on Slackware64 13.1 which has bash 4.1.7.

In desperation I tried rebooting but the behaviour was the same.

View 2 Replies View Related







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