[SOLVED]I'd like to remove them but...

Hello,guys:
I just wrote a tiny script to remove the packages that were installed as dependencies but are no longer
required by any installed package.However, it always complained to me for some reasons:
my script:
#!/bin/bash
pkg=$(pacman -Qdt|gawk '{ printf "%s ", $1; }')
test -n $pkg
if [ $? = 0 ];then
echo I will remove $pkg
sudo pacman -Rs $pkg
else
echo DO NOT NEED TO REMOVE ANYTHING!
fi
and it complained:
./abs.sh: line 3: test: git: binary operator expected
DO NOT NEED TO REMOVE ANYTHING!
P.S.:
[justin@YZMSQ Desktop]$ pacman -Qdt
git 1.7.0.3-1
phonon 4.4.0-1
What's wrong with my code?I need your help,please.:D
Last edited by YZMSQ (2010-03-30 09:42:47)

Put the $pkg into "" so it would expand to a string. (  test -n "$pkg" )
At the moment the shell thinks of your line as this: ( pkg="git 1.7.0.3-1 phonon 4.4.0-1" )
test -n git 1.7.0.3-1 phonon 4.4.0-1
( 3 extra arguments: "1.7.0.3-1", "phonon" and "4.4.0-1" )
With the little change above it would be like:
test -n "git 1.7.0.3-1 phonon 4.4.0-1"

Similar Messages

  • I converted some songs in iTunes to work with an eMusic device.  I'd like to delete them, but I'm not sure which of the duplicated songs to delete.  Some titles are black and some are gray.

    I converted some songs in iTunes to work with an eMusic device.  I'd like to delete them, but I'm not sure which of the duplicated songs to delete.  Some titles are black and some are gray.

    let's just doublecheck some things quickly. do any of the affected songs play in itunes at the moment? if so, when you play them, do they ask to be authorised?
    if so, does the authorisation go through successfully, or do you get an error message? (if you get an error message, let us know what it says. include error message numbers if you're getting any.)
    if the authorisation seems to go through successfully, with the authorised songs sync to the ipod?

  • I have 2 apps that have been waiting to update for a week.  I don't really care about the update, I would just like to use them, but the are stuck waiting.  I have tried powering down, syncing with my computer...all fails.  Any ideas?

    I have 2 apps that have been waiting to update for a week.  I don't really care about the update, I would just like to use them, but the are stuck waiting.  I have tried powering down, syncing with my computer...all fails.  Any ideas?

    At this point you have no choice but to update the or delete them and reinstall them since you wont be able to use them until they update - or come out of the "waiting" loop.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again.
    You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your app preferences and device settings again.

  • HT2105 I have several purchas's  my grandson made the  I did not realize were so high and would like to remove them

    My grandson made some purchases I did not realize were so high he had $25.00 in I Tunes cards but he went over that limit and I did not realize it.the purchases were on 2/1/2014 and 1/30/2014. I would like to have them removed and the updates removed if possible.

    It's not currently possible to merge accounts, nor to transfer content from account to another account - content will remain tied to the account that originally bought/downloaded it.

  • My computer was taken over by a bunch of pups I opened, and I removed them, but lost the search bar on my Mozilla start page, how do I retrieve it?

    Can't seem to retrieve the search bar that should be located beside the address bar. Tried for several hours, but can't seem to find the right information. I don't want to reset Firefox because I have too many customs set. I used options and put the find symbol, but it wouldn't open, so still need the search bar to fill in specific words for search feature.
    I also have a problem with the new tab- before I cleaned all the pups I used to go to mozilla home page and when I clicked on new tab, it always brought up the pages I had recently visited--now I just get a blank page, don't even get the FIrefox logo on the new tab. How do I restore this feature I use Mozilla firefox as my browser, and open that to my earthlink.net start page, something I do not want to lose,

    You can try to click the "Restore Defaults" button in the Customize palette.
    Make sure that toolbars like the "Bookmarks Toolbar" are visible.
    *"3-bar" Firefox menu button > Customize > Show/Hide Toolbars
    *View > Toolbars<br>Tap the Alt key or press F10 to show the Menu Bar
    *Right-click empty toolbar area
    Open the Customize window and set which toolbar items to display.
    *"3-bar" Firefox menu button > Customize
    *check that "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    *if "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the Customize palette into the Customize window to the Bookmarks Toolbar
    *if missing items are in the Customize palette then drag them back from the Customize window on the toolbar
    *if you do not see an item on a toolbar and in the Customize palette then click the "Restore Defaults" button to restore the default toolbar setup
    *https://support.mozilla.org/kb/customize-firefox-controls-buttons-and-toolbars

  • [Solved] I have Tango (Tango icon theme), but GTK ignore it

    I have set "Tango" in config file of GTK (.gtkrc-2.0):
    gtk-icon-theme-name = "Tango"
    and installed tango-icon-theme form AUR:
    /usr/local/share/icons/Tango/index.theme (I see it!)
    but PCManFM ignore it when I start new thread... (GTK greeter and etc.) Installation was so simple: ./configure; make; sudo make install... What can I do?
    Thank you!
    Last edited by Matesax (2015-01-28 09:19:56)

    Not a Sysadmin issue, moving to Newbie Corner...

  • HT2954 Need help on deleting emails from my email account i'm able to select all and remove them but when i recheck  all deleted emails come back now have 3000 plus

    how do i remove emails completly from my account

    In mail, highlight the mailbox you deleted the messages from, then on the menu bar click mailbox then rebuild. That will usually get rid of deleted messages that won't delete.

  • My storage say I have 67GB of movies - I cannot find them but want to remove them to create space

    My storage says I have 67GB of movies -I am unable to find them. Any suggestions? As I would like to remove them to create space

    Hi JPNolan,
    Thanks for the question. Based on what you stated, it seems like you are trying to find movies. I would recommend that you read this article, it may be able to help you isolate or resolve the issue.
    OS X Mavericks: Keywords to use in Spotlight searches
    To specify the type, add the text “kind:<type of item>     
    Movies
    kind:movie
    kind:movies
    Thanks for using Apple Support Communities.
    Cheers,
    Mario

  • Looking for a theme that looks like the default theme.

    I'm looking for a theme that looks exactly like the default theme, but that doesn't use the colours of my gnome theme. Right now I'm using a dark gnome theme that looks great, but looks horrible with firefox. Anybody got any suggestions?
    Alternatively, is there another way to make firefox ignore my gtk theme?

    I don't like the way firefox themes look, I want the default theme, but without gtk coloring. Surely it must be possible?

  • Duplicate Genius Mixes keep reappearing after I remove them

    iTunes keeps generating duplicate Genius Mixes. I right click on them and remove them but when I go back to Genius Mixes they're back again.
    Also the duplicate ones contain songs that don't fit under the title. For instance, iTunes generates 3 Singer/Songwriter mixes, one which is the original one and contains Stevie Nicks, Billy Joel, Elton John and others, while the other two mixes contain Herman's Hermits, New World, The Beach Boys, The Turtles and The Monkees, all of which don't fit into the Singer/Songwriter genre.
    I don't think it should be a problem for iTunes to generate different mixes, considering that I have over 5,000 items in my library and a wide variety of genres.
    How do I stop iTunes from generating the same mixes?

    I have this exact same problem. I created a rule for Mail to move e-mails, with some given keywords in them, into the junk folder. Then I removed the rule completely, deleted it. But all incoming e-mail are still moved to the folder. Although I have NO rules left.

  • Removing FCE but leaving Final Cut Pro

    I have both Final Cut Express and Final Cut Pro installed on my computer. I no longer use Final Cut Express. I downloaded the program "FCS Remover". Apparently it will remove both FCE and Final Cut Pro. There is no option to only remove one of those programs. Is there a way to remove only FCE while leaving Final Cut Pro on the computer? I would also like to remove Soundtrack but keep Soundtrack Pro. I guess if all else fails, I can remove both programs and then reinstall Final Cut Pro.

    Here is an Apple Knowledgebase article that includes instructions on manually removing FCE. Pretty straightforward.
    There is also a more detailed but older set of Apple instructions for removing FCE. Still applicable for FCE 4. Note, however, that since you have FCP also installed, if you follow this document, you should be careful NOT to remove items that may also be in use by FCP. They'll be pretty obvious.

  • I would like to remove my old skype accounts and have to password and email address

    Hi my concern is that in the past I have opened few profiles and wish to remove them but have no longer any details of the password or e-mail address I have opened them under.Is there any other way I can remove them..Please advise me 

    you can install and use on up to two computers at any one time with your single-user license so you need not sign out from your old computer's cc app.
    but if you no longer want cc on your old computer, open your desktop cc app and sign out, http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    to install on your new computer go here and download the cc desktop app using your adobe id, Download Adobe Creative Cloud apps | Free Adobe CC trial

  • I have placed a theme but I don't like it, how can I remove it?

    I upgraded my firefox and saw that I could place a theme, I did it because It sounded nice, but I don't like it at all. Can you tell me how to remove it?

    Hi, you can find out how to switch and remove themes in the article [[Using themes with Firefox]]

  • HT1918 hey am stranded its like a month now my account does not have  the None in the payment type section i had put my visa info but not now i want to remove them please urgent help

    hey am stranded its like a month now my account does not have  the None in the payment type section i had put my visa info but not now i want to remove them please urgent help

    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • I am having trouble removing songs from my iPhone.  i have unchecked songs in the library on my mac, but they still show up on phone after syncing.  how do I remove them?

    I am having trouble removing songs from my iPhone.  i have unchecked songs in the library on my mac, but they still show up on phone after syncing.  how do I remove them?

    Hi asims01,
    Welcome to the Support Communities!
    The information below may be able to answer your questions about how to delete songs from your iPhone:
    Deleting songs downloaded to your device
    Tap the Music app.
    Tap More > Songs at the bottom.
    Scroll or search for the song you would like to delete from your device.
    Swipe right to left on the song, and then tap Delete.
    Note: You must be in Artists, Songs, or Albums view to delete songs from your device. Deleting from a playlist won't remove a song from your iOS device.
    Also, this information can be found on page 64 of the iPhone User Guide for iOS 7
    http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    Remove a song from iPhone. Tap Songs, swipe the song, then tap Delete. The song is deleted from iPhone, but not from your iTunes library on your Mac or PC, or from iCloud.
    If you have iOS 7, this will delete the song from local storage, but the song will still appear with a cloud symbol in the Music app, as you've noticed. To hide the iTunes in the Cloud purchases, navigate to Settings > iTunes & App Store, and disable "Show All: Music”
    There may be a few orphaned songs on your iPhone that were partially downloaded or corrupted in some way. If that is the case, you can erase all of the music from your phone.  Follow the instructions below and select the Music app under Usage:
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/ht1867
    I hope this information helps ....
    - Judy

Maybe you are looking for

  • Multiple Macs: Disk Images or Clones

    Greetings, I have a MBP that is my main machine. The wife has an iMac with an older OS. I also just bought a Seagate FreeAgent Go for Mac (320G), and want to create backups of both machines on this external HD. Reading around, I know I can create dis

  • Installing Windows 10 Tech Preview on Yoga 13 as dual boot

    Hi guys, I'm new here, but have the Yoga 13 for almost 2 years now. But that's not the case though I'm having problems installing the Windows 10 Technical Preview on my machine on a new partition. I have lowered the storage on my Windows8_OS drive wi

  • Hide the field from datasource 0EMPLOYEE_ATTR

    Hi Experts, I have a requirement. Even i search in forum but i couldn't find out... in data sourct 0EMPLOYEE_ATTR, i want to hide the field ANSAL(Annual Salary). This Data source is populated from the function module HR_BIW_GET_MASTER_DATA. We can hi

  • Unable to Update software on an iMac Tangerine DV (400 Mhz) -

    Hello guys, I´ve recently been given a iMac DV (they were doing a backroom clearance in my office) and I have decided to upgrade it and update it in order to be able to run mac ox X. Right now it´s running OS 9.0 . I know I have to do the firmware up

  • Alert: Magican and Request for Help

    I made the mistake of installing some new software, supposedly a cleaning utility called Magican, which I think may be some kind of malware. Immediately after running it, I began to have problems launching some applications. I tried to remove it and