[SOLVED] Trying out scripting for the first time... confused...

ok so here is the script that I have started
echo 'This is a custom updater app written by Daniel Schneider'
echo "Check for updates now? (y/n)"
read answer
if [ "$answer" = "y" ]; then
sudo pacman -Syy
sudo pacman -Syu
read
fi
if [ "$answer" = "n" ]; then
exit
fi
but when ran, pacman reports another package manager running when that is not true.  Here is the output exactly..
:: Synchronizing package databases...
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
:: Synchronizing package databases...
error: failed to init transaction (unable to lock database)
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
So how do I fix this bug in my script?
ps. I know this script is kinda silly just messing around with "coding" for the first time
Last edited by Dans564 (2011-03-22 20:11:31)

Not sure if this is true
but instead of
sudo pacman -Syy
sudo pacman -Syu
try
sudo pacman -Syy && sudo pacman -Syu
If I'm not mistaken the reason why is giving that error is because you are trying to do sudo pacman -Syy and sudo pacman -Syu at same time which is impossible . I think with a && first will do the first comand and only when this is over will run the second.

Similar Messages

  • Tried synching iphone for the first time on new PC and got error followed by itunes logo and USB cable picture. No idea what went wrong and now phone is in this screen locked. please help!

    tried synching iphone for the first time on new PC and got error followed by itunes logo and USB cable picture. No idea what went wrong and now phone is in this screen locked. please help!

    I tried connecting to iTunes and neither the PC nor iTunes recognizes the device. I went through all the troubleshooting on the Apple website for this issue and nothing worked. I've reinstalled iTunes, the driver, everything and still can't get either the PC or iTunes to recognize the phone.  I don't know what else to do :-( any help or suggestions are highly appreciated!
    I would hate to have lost all my info, especially contacts and calendar items since I have no idea what was backed up prior to the phone getting locked on this screen. I've been told that my only option is to go to the phone carrier and they will reset it for me, but that means it will wipe out all the info.
    I hope someone has a fix other than that one.

  • I just tried to sync for the first time and i receieved an error message saying, "Itunes could not backup because backup could not be saved on the compute"??

    i just tried to sync for the first time (iohone to PC) and i receieved an error message saying " it iTunes could not backup because backup could not be saved to the computer"

    just as i've posted the same issue here   hope that someone could give us a hand. I have just swtched from nokia to iPhone for my company cell and i have more than 1000 contacts... it would be murder to create those contacts one by one )))))

  • How do i log in on a macbook air with out wifi for the first time

    How do i log in on a macbook air with out wifi for the first time

    More details needed.
    Otherwise just startup the computer and enter your password.
    New Mac?
    A new Mac comes with 90 days of free tech support from AppleCare.
    AppleCare: 1-800-275-2273
    Call AppleCare.
    Best.

  • Bug when trying to commit for the first time

    I have a bug that I tried to solve but can't find any solution till now.
    I have a table that contains many rows and from this table I can press edit or add to open a new page that I can edit or add a new record for this view
    the page that contains the table has execute with parameter as I open this table from another page
    the problem is that the first time I go to this page ('that contains the table')
    and I try to edit or add a new record and press save the form save correctly but clear itselt and fields appear as read only fields "the for doesn't save its state"
    but if I press roll back for example and go to form the contains the table and come back to add or edit a record the page works correctly with no problem.
    how can I fix this.

    No there is nothing in this page
    but the page I call this page from (parent Page) have execute with param on the page binding.
    I added commit to the parent page and added call to this commit on Prepare Modle .
    and this fixed my issue but I don't know till now why this issue appeared to me .
    any one knows why this happened.

  • Trying to sync for the first time to my ipad. device not shown on leftside. i want to sync photos using iphoto.

    trying to sync photos from macbook pro to ipad, first time. What do i do if no device is shown even though it's plugged in, etc?

    Thanks, Jim.  I finally got it all to work after I closed iTunes on both machines, unplugged the iPad, and started from scratch. To anyone else having this problem, if you hit the wrong thing for "device", it disappears totally.
    Gail

  • HT204088 Why is itunes asking security questions that were never asked in my set up?  I am trying to purchase for the first time and now I am locked out.  Not Happy.  grrr

    I have set my itunes account up and now I want to make a purchase, however Itunes wants me to answer security questions, these questions are not the same questions that I answered while setting up my account therefore I have no answers and now i am locked out.  I am extremely frusturated.  HELP!!! 

    Click here for information. If the option to have the answers emailed to you isn't available or doesn't work(the email may take a few hours to arrive), contact the iTunes Store staff via the link in that article.
    (88522)

  • HT1386 i bought a new iphone and im trying to sync for the first time.  Do I restore from the backup of my old phone or set up from my new iphone

    any thoughts

    If you want to restore the settings and data from your old phone to your new one, restore from the backup of your old phone (see http://support.apple.com/kb/HT2109).  You will still have to sync with iTunes to transfer apps, music, and other iTunes media back to your phone.

  • Booting for the first time in my Lenovo G500

    Hi everyone!
    I'm trying to boot for the first time in my Lenovo G500. It starts with the logo of lenovo and then it goes to a black screen and it is saying that is loading FreeDOS and is asking to enter a new date, new time and then it says C:/> and nothing happens. 
    I put in the cd with Windows 8 drivers but i can't make it boot from the cd/dvd. 
    Anyone can help?
    Thanks!

    Hi Stathesp,
    Welcome to Lenovo Community Forums!
    I’m sorry to hear that your G500 Laptop is booting to Black screen, I suggest you to change the Boot priority of CD/DVD drive 1st and HDD (Hard Disc Drive) to 2nd, below are the steps to access BIOS:
    Turn OFF the computer and then click on NOVO button which is located at the left side of the computer.
    Then under Boot tab change the CD/DVD as 1st boot and HDD to 2nd device.
    Now press “F10” Key to save the changes, the computer will automatically restart.
    Then check inserting the Disc and check the issue.
    Do post us back if the issue still persists.
    Best Regards
    Shiva Kumar
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • Oracle XE 10g connect for the first time

    I have just installed Oracle10 g express edition on Windows XP service pack 3, when trying to connect for the first time
    I get the ORA-12631 message error when trying to connect!!
    SQL> connect system
    Immettere la password:
    ERROR:
    ORA-12631: Recupero nome utente non riuscito
    Can anyone help me?

    sorry here is:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\>set
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    ambiente=AC
    APPDATA=C:\Documents and Settings\UR00780.HD01\Application Data
    CLIENTNAME=Console
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=ACMI1252
    ComSpec=C:\WINDOWS\system32\cmd.exe
    cstella=VERONA
    FP_NO_HOST_CHECK=NO
    fserver=ACSWDWV01
    HOMEDRIVE=H:
    HOMEPATH=\
    HOMESHARE=\\acnas200.intranet.unicredit.it\UR00780
    KITID=AC
    LOGONSERVER=\\USADSW340
    LSERVER=ACSWDWV01.hd01.unicreditgroup.eu
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
    Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facil
    ity\;C:\Program Files\Symantec\pcAnywhere\;C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\Program Files\Int
    el\DMIX;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PCOMM_Root=C:\Program Files\IBM\Personal Communications\
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 37 Stepping 2, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=2502
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\UR0078~1.HD0\LOCALS~1\Temp
    TMP=C:\DOCUME~1\UR0078~1.HD0\LOCALS~1\Temp
    USERDNSDOMAIN=HD01.UNICREDITGROUP.EU
    USERDOMAIN=HD01
    USERNAME=UR00780
    USERPROFILE=C:\Documents and Settings\UR00780.HD01
    windir=C:\WINDOWS
    C:\>

  • Getting error while synchronising for the first time to get Device ID

    Hi All,
    When I am trying to synchronise for the first time to get device ID I am getting following error.
    Could any body through some light on this please.
    • Synchronization started 
    • Connection set up (without proxy) to: http://XYZ:portno/meSync/servlet/meSync?~sysid=MOB& 
    • Connection to server failed. 
    • Synchronisation problems: Transport-layer (http) sync exception raised (root cause: Exception while synchronizing (java.io.IOException: Not in GZIP format)) 
    Regards,
    Ameer Baba.

    Hi,
    please let us know what patch level your middleware is running on.
    The mobileengine.config file is placed in the MI client installation directory in subfolder settings. On PC it is in
    c:\Program files\Sap Mobile Infrastructure\settings.
    From the URL you mentioned above you are using the "old" technology. Please go the service.sap.com/instguides and follow the setup guid for the old technology.
    When you enter the URL directly into the browser you should get a LOGON popup. This shows the service is running. I would expect that you do not get this popup due to missing setup.
    If you want to use the new sync service in SICF and you have configured this. have a look into the manual. In that case you are missing some settings on the MI client. The problem is, that the old MI client uses old sync service by default.
    Regards,
    Oliver

  • Problems Importing into LR5 for the first time.

    Hi all, just moving from Aperture to Lightroom 5 and trying to import for the first time into LR from my camera.  LR sees my cameras but can detect no images on the cards. 'No images found.' Please help!

    Hi Charlie,
    Sorry. although I understand where you are coming from, I really don't have anything to add to my previous post. If no card reader, copy from camera to hard disk if you can. If you cant, then buy a card reader.. I mean, maybe you or somebody will come up with something else before it comes down to that, but if not..
    PS - It's critical that your camera is emulating a disk drive. Is it? Can you browse to and open the files using your OS? if not, Lr won't stand a chance.
    Rob

  • HT1657 trying to rent a movie on apple tv for the first time and can't do it without authorizing my computer on itunes store but can't find the menu on the iTunes site that lets me authorize my computer. any thoughts out there?

    trying to rent a movie on apple tv for the first time and have to authorize my computer but can't find the itunes menu that allows me to do this.  any thoughts out there? 

    If the computer's running Mac OS X, move the cursor to the very top of the computer's screen, click on Store, and choose Authorize this Computer.
    If the computer's running Windows, press the Alt and S keys and choose Authorize this Computer, or click here, follow the instructions, click on Store in the menu bar, and choose Authorize this Computer.
    (98261)

  • I am trying to run my registered CS6 Design Standard programs for the first time after install. InDesign runs OK, but Illustrator and Photoshop will only run in trail mode. How do I activate those two?

    I can't get my registered versions of CS6 Photoshop and Illustrator to run in full mode. I installed CS6 Design Standard online end of June (an upgrade from CS5.5), on my old MacBook Pro. I didn't run the programs then as I was waiting on arrival of new MacBook Pro. I migrated the programs from my old MacBook to the new, and today tried to run those programs for the first time. InDesign work OK (after an initial hiccup) but Illustrator and Photoshop will only run in trial mode, and won't let me save files. My CS6 Design Standard shows with it's registration in my Adobe Account. All seems in order, but Illustrator and Photoshop won't run in registered mode. Can you please help?

    Demons1 in the future please only migrate your documents and settings.
    Please use the uninstallers to remove your current installation.  They are located in the Applications/Utilities/Adobe Installers folder.  Once the uninstall is complete you will also want to run the CC Cleaner Tool.  You can find more details at Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
    If you need to download a fresh copy of the installation files for Creative Suite 6 you can do so at Download CS6 products.

  • I have just tried to convert a PDF file for the first time. Get error message-can't access service.

    I just purchased ExportPDF and have tried to convert a PDF file to *.docx and *.rtf for the first time.  In both cases I get a file that says there was an error is accessing the online service.  What do I do?

    Could you try these steps to alleviate the access issue you're having:
    Choose Edit > Preferences (Win) or Adobe Reader > Preferences (Mac)
    Click 'Online Services' on the left-hand side
    Sign out of our Adobe ID and sign back in.
    Try to convert your document again.
    If you continue to have trouble, please verify that you can access the service via the web interface.  To do this:
    Open a browser and navigate to http://exportpdf.acrobat.com/signin.html
    Try to log in with your Adobe ID (email address) and password
    Once logged in, follow the on-screen prompts to convert a file
    Let us know if you're still having trouble and we'll try to help!
    -David

Maybe you are looking for

  • Upgraded Itunes to 11.1 and iphone 4s to IOS 7. Now music won't sync.

    Stuck on waiting for changes to be applied. I've tried everything i can find in the forums, and now i have no music on the phone. I've recreated the library file, unlocked the scree, tried disabling my apple if temporarily, tried syncing over wi-fi a

  • I need help installing adobe digital 2.0 on windows 8.

    I have windows 8 and when I try to install the install stops and says I need a certain upgrade for microsoft.net.  I go to the page it says and try install said version and get the message that I have a later version already installed as part of my o

  • Leverage Deal

    Hi Friends, any one having idea about what is mean of Leverage Deal? i was asking to create a sales order in CRM using reason Leverage Deal. i am not understanding what is leverage deal. Regards Deva.

  • GL Line item text mandatory

    Hi, We have a following requirement: 1. Client needs that during MIGO/MIRO & release to accounting (SD)  transaction, in GL line item text field , standard text should copy i.e. in accounting document, under GL line item field that standard text shou

  • Preview crashes on save of edited pdf

    Hi, I'm trying to delete pages in a large (500+ pages) pdf. It's a public-domain ebook from Google that I only need parts of for my research and I'm trying to minimize storage space and reading. I can delete the pages in Preview (select, delete) but