Programming :: One-liner With && And || Didn't Work
Feb 9, 2011
I recently noticed some of my one-liners with && and || didn't work as I expected so I googled for "bash && || pitfalls" and found this page [URL] It's probably my fault, but I still don't understand why it wouldn't work as I want it..... I don't even have the code anymore that wasn't working properly because I rewrote it using if ; then ; command ; fi
View 4 Replies
ADVERTISEMENT
Oct 16, 2010
As indicated in the subject, I want to search a text. If the text is present I want to replace it. But if the text is not present, I want to insert it after first line and before last line.
Searched text is:CleanCache "*";
Where * can be anything.
Example: CleanCache "false"; -> CleanCache "true";
If CleanCache "false"; is not present, only insert CleanCache "true"; after first line and before last line.
View 8 Replies
View Related
May 25, 2011
I will eventually script this but wanted to know where I screwed up when trying to get this oneliner to work. In a nutshell, I want to created a backup directory, find any files that have changed in the last 48hrs and them copy them to the newly made backup directory.
PHP Code:
date=$(date +%m%d%Y)mkdir -p /home/test_dir/backup$date;find . -mtime 1|xargs -0 cp -r -t /home/test_dir/backup$date
When I do this I get:
PHP Code:
a bunch of junk !#$#$$#! File name too long
I also tried:
PHP Code:
date=$(date +%m%d%Y)mkdir -p /home/test_dir/backup$date;find
. -mtime 1|xargs -0 cp -r {} /home/test_dir/backup$date
View 7 Replies
View Related
Jan 22, 2010
Just installed CentOS 5.4, had no problems until the first time it tried to login, where the keyboard didn't work. There are bugs logged on both the CentOS site, and the Red Hat site, but nobody seems to have a definitive solution (other than buy a USB keyboard). Bearing in mind that the machine in question is not hooked up to a network (i.e. no internet updates), is there a way to resolve this issue?
View 6 Replies
View Related
Apr 4, 2010
What does it do?? Can i remove it??i tried apt-get remove dnsmasq. it didn't work
View 9 Replies
View Related
Jul 20, 2010
i did it to mount my hd in the startup but id didnt work, so i want to undo it, and if somebody can tell how to make my hd to be mounted since the startup
[Code]...
View 5 Replies
View Related
Feb 11, 2011
My laptop is an HP Pavilion dv6 3078-tx. It is was a great laptop when it was running windows 7 but when I tried installing Ubuntu, I slowly began to hate it more and more. The issue is with the ATI and Intel switchable graphics card. Ubuntu installs fine and things seem to be great but I cant use the better graphics effects in ubuntu. I installed the driver that ubuntu provides for ATI and it didnt work and ubuntu booted into a terminal etc.. and I had to put it back to the way it was before. After sometime researching on the internet I know the problem is with the swtichable graphics.
Unfortunatley there is no option to turn off switchable graphic in my bios and hp arent much of a help. I dont know what to do now ? Is there any way to get switchable graphics to w ork with linux, is there way to get version of the bios that lets me disable it ? any variations of ubuntu or linux that it works with. I would prefer to use the ATI if i have to disable one or the other cause Im usually running on ac power anyways.
View 2 Replies
View Related
Mar 10, 2010
i had just installed fedora 12 and my architecture is x86_64. i add dictionary widget on my plasma desktop. in my office i am using internet via proxy. now how can i configure dictionary widget to use the same proxy settings? in my shell i have export http_proxy variables, where else i am suppose to set proxy?
View 3 Replies
View Related
Jan 12, 2011
I have Lubuntu 10.10 on and old old IBM Think T22 with an Asus wl-107g WLAN PCMCIA card installed.. When i first installed the distribution it didn't work. Then i rebooted a couple of times and then it worked no bother, but now it doesn't work again..
The error is basically that it doesn't seem to recognize it anymore.. it doesn't recognise any network hardware other that the built in ethernet card (which for some reason got the name eth2, suggesting that there is an eth0 and eth1 but ifconfig doesn't show them)
View 3 Replies
View Related
Mar 3, 2010
install ( fotoxx-9.2.tar.gz ), apt-get install fotoxx didnt work. Its on my desktop waiting.
View 5 Replies
View Related
Apr 19, 2010
OS :: Debian Lennyldap :: Openldap (newest one/get from apt-get)replication :: yes (on different machine)secure :: yes (tls)hi there i got problem on slave ldapwhat i am trying to do now is to have machine authenticate at slave ldapwhen master ldap die. So i stop slapd service at master ldap and try to authen. As a result of it, the prompt for login appears to fill in username but with the correct password couldn't make login successfully. I have checked at log file but there is any authen log of that login I wonder if it doesn't direct authen to slave ldap server. Here is my client config ::
#
# LDAP Defaults
#
[code]....
View 3 Replies
View Related
May 25, 2010
I was able to do on Debian and Ubuntu Servers X applications running on remote servers where I was able to login via SSH. Tried the same with CentOS did not worked. in /etc/ssh/sshd_config
[Code]....
View 1 Replies
View Related
Sep 22, 2010
It was working fine But when I came back form vacation it dint work its all about [URL] When I log in it says premium a/c But when i try to download any file in new tab it says "Log in again" How can i set firefox so that i dont have to keep login again?
View 1 Replies
View Related
Jul 20, 2010
I have gotten Debian working quite well on my Sony Vaio laptop for the past 6 months or so, and it's a very rewarding experience. I however have a small amount of problems that I could not find the answer to through googling or reading Debian instructions.
1) I have an Atheros-based wireless chipset in my laptop that didn't work with the default wireless drivers in Debian. So I replaced them with madwifi drivers and it works great now. However, every time I restart the computer, it defaults back to 1mb/s wireless speed; making me go into root terminal and change the speed with "iwconfig ath0 rate 54M". Obviously this gets a little bit annoying to enter every time, so I am looking for a way to make it automatic. I have looked on Google and gotten some hits but none of them have been successful.
2) Whenever I put the computer on stand-by then return, the wifi refuses to connect. Networkmanager tries to connect then crashes. I have found no hits on this issue with my configuration. Very odd.
View 8 Replies
View Related
Jun 12, 2009
I have successfully installed Fedora 11. It works fine with no problem what so ever. My problem is that while using F10 I have created a separate partition for "home". I tried to use the same /home partition for F11 but it did not work. how to achieve this and at what state of the installation.
View 14 Replies
View Related
Mar 17, 2010
I bought the modem above (ZTE MF627), which works great in Windows 7. My laptop dual boots between Windows 7 and Fedora 12, so I rebooted into Fedora and spent a few hours trying to get the modem working. Scouring the Ubuntu forums (as there's only one post on these forums and it simply didn't work), I found a few possible solutions, but nothing seems to be solving the problem. Here goes... The modem gets picked up by the kernel and appears as a USB device.
[Code]...
View 2 Replies
View Related
Jul 21, 2011
Recently I tried putting Kubuntu Natty Narwhal on yet again and to my surprise it mostly worked. The only major thing wrong with it was my brightness controls didn't work (I have a VPCCW21FX laptop) at first this was an anoyance being blinded by my screen but I soon realized that it was killing my battery life. So having tried to seek help in getting it to work I tried out OpenSUSE. They worked! but as soon as I updated the kernal they no longer worked. No Problem. I reinstalled and told it to never apply that update. Then I installed the official nvidia drivers via repository on the opensuse wiki. they installed and worked but my brightness controls were once again broken.
Sony VPCCW21FX Laptop. Intel Core I3 Nvidia 310M
Nvidia Driver version 270.41.06-5.1 x86_64
View 9 Replies
View Related
Feb 12, 2010
It's possible I just did something wrong...Anyway, I don't have any sounds, and haven't since installation.
Code:
00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge
Subsystem: Hewlett-Packard Company Device 3059
[code]...
View 1 Replies
View Related
Jun 12, 2010
Maybe saying Ubuntu is getting worse is unfair. I'm not a big user I have to say. I use it more out of curiosity than anything else. I first used 8 and it was brilliant. I told all my mates about it. Everything work great. I had all desktop effects. I could use a KDE session. Then I upgraded to 9 and lost KDE ability but still had all desktop effects available. Upgraded to 10 a few weeks ago and now no desktop effects. Non of the above is a problem but I feel like, for me, it's going backwards.
I use an old AMD 2600 machine with a Radeon 9600. I used to be able to use ATI Catalyst but that didn't work after the upgrade to 10 and I can't seem to find a solution. Ubuntu is still brilliant but I don't like things being taken away from me.
View 7 Replies
View Related
Aug 26, 2010
Wow -everything works with alpha-3 version with a fresh install. Sound, wireless modem, processor speed scaling, sound controls, touch pad, all cores running,power management, battery, fans, etc. NVidia driver is also working. I tried multiple other distro installs - opensuse, Fedora, and ubuntu 10.04 - none worked. Also tried upgrading from 10.04 to 10.10 which didn't work either. also tried upgrading to 2.6.35 kernel which didn't work either.
I'm running a toshiba satellite a505-6030 with an i7 core, nvidia graphics gforce 310M. i didn't have to pass any arguments to grub either . First boot seemed to stall, rebooted machine, and it's been working perfectly since.
View 4 Replies
View Related
Jan 29, 2011
I tried "gksudo nautilus", and it didn't work! When the root window pops-up, it isn't there! I would like to delete this annoying file so that i can see my whole desktop.
View 7 Replies
View Related
Apr 19, 2011
I remember I tried to boot Ubuntu Netbook Edition LiveCD once, but I had a problem with 3D graphics, and a result I couldn't see the menu panels, etc. So, I was wondering, will the same thing happen with Natty, since they are both Unity? Or will they improve support for graphics in 11.04?
View 2 Replies
View Related
Jan 7, 2011
i have MB:Gigabyte 770t USB and Cpu Phenom II x2 555 BE My sound card didnt work and i have no sound at alll. only hardware that reconized as sound output in my sound setting is 5700 series HDMI which blong to my VGA.
View 9 Replies
View Related
Mar 3, 2011
What is the correct way to copy a file or directory to another directory? In the past I was able to use press the mouse left and right button, it didn't work all the time hard to press the two buttons at the same time. With the Fedora 14 it does not work at all.
View 3 Replies
View Related
Sep 24, 2010
I have a script put in cron.daily and edit the var/spool/cron/crontabs/root file with this text
Code:
View 1 Replies
View Related
Mar 15, 2011
I have a file:
979798707
787862348
766428634
I want to see if all the records in the file are present in the contents of the files of a particular directory.
Basically I want to say if grep doesn't return anything, then report.
For example in /tmp dir I have 4 files and flast 2 values (787862348 and 766428634) are present in the files of /tmp dir, but first one (979798707) is not. I want to echo that in a reporting file.
something like:
while read line
do
# if ! grep -rl $line /tmp
echo $line >> are_not_present
done < "myFile"
How do I achieve " if ! grep -rl $line /tmp"? That is, if the line is found by grep, then grep will print the output, but if grep does'nt find it, it will print nothing. How can I check if grep didn't find it (i.e. printed nothing)?
View 2 Replies
View Related
Jul 27, 2010
I make personal site with php on wamp. When uploaded it to my debian box I make some comments in index.php like
Code:
//include(realpath('inc/inc.php'));
echo realpath('inc/inc.php');
upload the changed php file, but when try to reload the site same errors stay there. There is some cache that I have to clear but I don't know where it is. In wamp I clear wamp mp* directory What cache I have to clear? Edit: It is not my browser. I use firefox and clear everything with several times ctrl+shift+del I even delete index.php but the same errors stay at the page:
Code:
Warning: include(inc/inc.php) [function.include]: failed to open stream: No such file or directory in /var/www/site/index.php on line 3 Warning: include() [function.include]: Failed opening 'inc/inc.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/site/index.php on line 3
View 1 Replies
View Related
Jun 15, 2010
I bought a brothers printer yersterday. And it doesn't work on Debian Lenny. I've tried to install this drivers : dcp195clpr et dcp195ccupswrapper with dpkg command but nothing work. When I try to print nothing happen. But in CUPS, there a printer call dcp-195c.
View 4 Replies
View Related
Apr 4, 2009
I use FC9. Yesterday after system update I turned of the computer, but today when it booted the wireless didn't work, ndiswrapper device wlan0:1 does not seem to be present, delaying initialization.I have removed and again installed the wireless driver and looks like it is ok,
[root@localhost utils]# ./ndiswrapper -r bcmwl6
[root@localhost utils]# ./ndiswrapper -i /fatfs/Archiv/Softwere/Drivers/Dr_software/bcmwl6.inf
installing bcmwl6 ...
[root@localhost utils]#
after ndiwwrapper -m
it gives warning( or error )[root@localhost utils]# ./ndiswrapper -m
module configuration already contains alias directive
[Code]....
View 3 Replies
View Related
Mar 7, 2011
If you typed it in, my fdisk -l looks like this
[Code].....
I partitioned it using the Acronis (proprietary) partitioning software. I've had to move these around a bit when I initially set it up and at one point grub didnt work anymore. It was after I had to expand my Windows (7) partition. However I'm told that most modern software dont use the same unit of measurement that fdisk still uses 'til this day. Should I even be concerned? I did have to reinstall grub after I initial set all my partitions up. This post is merely a double-check to make sure.
View 7 Replies
View Related