Shell problem not working!!! :((

This is my not-working problem: Being given a text file create a folder that will contain 26
dictionary files as follows:first file contains the words
begining with 'A', alphabetically sorted, the second file with
'B' and so on.
I tried with awk but either I have written it wrong, or it can't be solved with it.

Unfortunately we don't have a magic ball to look at your given script/command so we can't suggest anything.
Markus

Similar Messages

  • Powershell unzip with shell.application not working when launched from windows service

    I have a deployment agent on a machine implemented as a windows service. Service is 32-bit and runs on windows server 2008R2 x64 SP1 with powershell V2. Powershell script requires elevation and to run under x64 because of dependency to powershell module
    'IIS Administration'. To achieve this, the service starts a cmd file which in turn launches powershell x64 console:
    C:\WINDOWS\sysnative\WindowsPowerShell\v1.0\powershell.exe "Start-Process C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell -ArgumentList '-ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File C:\Temp\EndJobCmd\Install.ps1' -Verb RunAs"
    This seems to work well. The problem I have is that the script has a sequence where it unpacks a zip file to a destination folder using shell.application, this works fine when triggered manually on the server or through the task scheduler, but when triggered
    from the service it does not extract any files at all (cannot see any errors thrown by the script but it seems to continue to execute as it logs a successful message to the event log after finishing).
    Unzip sequence looks like:
    $shell = New-Object -com shell.application
    $pkg = $shell.namespace($sourceFile)
    $installDir = $shell.namespace($targetDir)
    $installDir.Copyhere($pkg.items(), 20)
    Any advice greatly appreciated. I have searched some and seen a few people with similar issue but have yet to find a solution.

    If it's still actual, I managed to fix this with having CopyHere params equal 1564. 
    So in my case extract zip function looks like:
    function Expand-ZIPFile{
    param(
    $file, $destination
    $shell = new-object -com shell.application
    $zip = $shell.NameSpace($file)
    foreach($item in $zip.items())
    $shell.Namespace($destination).copyhere($item,1564)
    "$($item.path) extracted"
    1564 description can be found here - http://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx:
    (4) Do not display a progress dialog box.
    (8) Give the file being operated on a new name in a move, copy, or rename operation if a file with the target name already exists.
    (16) Respond with "Yes to All" for any dialog box that is displayed.
    (512) Do not confirm the creation of a new directory if the operation requires one to be created.
    (1024) Do not display a user interface if an error occurs.

  • External Microphone problem not working.

    I am trying to get a Sony ECM-DS70P Condenser Stereo Microphone with a 3.5mm stereo male plug to work on my MacBook Pro with a Behringer UCA222 USB Audio Interface and I am having no joy at all.
    Summary of Problem
    The Microphone will not work when plugged directly into the Line-in jack on the MacBook Pro because the Audio Line-In input on the MacBook is line level -10dB to+4dB and microphones are generally around -40dB. So, I need either a line level preamp or a usb audio interface.
    I decided on a USB Audio Interface (Behringer UCA222).
    The Microphone is plugged into a 3.5mm stereo to RCA L & R cable which is plugged into the L/R RCA inputs on the Behringer UCA222. The Behringer UCA222's USB Cable is plugged into a USB port on the MacBook Pro.
    On the Macbook Pro in System Preferences > Sound > the output is set to Internal Speakers and the input is set to the USB Codec (Which showed up when the Behringer UCA222 was plugged in).
    But it doesn't work!
    Any help from anyone would be very much appreciated.
    Here are all the specs:
    Sony ECM-DS70P Microphone
    Frequency Response : 100-15,000Hz
    Maximum Input Level : 110dB SPL (THD 1% @ 1kHz)
    Noise Level : 34dB SPL
    Plug : L-shaped gold-plated mini plug, 3.5mm
    Sensitivity : -38dBV, ±3.5dB
    Type : Electret condenser microphone
    Behringer UCA222 USB Audio Interface
    Link to Specs:
    http://www.behringer.com/assets/UCA222_P0A31_M_EN.pdf
    MacBook Pro running   OSX Lion 10.7.2
      MacBook Pro
      15" Early 2008
      2.4GHz Intel Core 2 Duo
      Model Identifier:          MacBookPro4,1
      Processor Name:          Intel Core 2 Duo
      Processor Speed:          2.4 GHz
      Number of Processors:          1
      Total Number of Cores:          2
      L2 Cache:          3 MB
      Memory:          2 GB
      Bus Speed:          800 MHz
      Boot ROM Version:          MBP41.00C1.B03
      SMC Version (system):          1.27f3
      Serial Number (system):          W88********
      Hardware UUID:          298BAA49-A3B8-549F-8A3C-************
      Sudden Motion Sensor:
      State:          Enabled

    Zyriab wrote:
    Glad you got to the root of your problem.   I've also been looking at USB microphones and am considering this:
    http://www.amazon.co.uk/Blue-Microphones-Yeti-USB-Microphone/dp/B002VA464S/ref=w l_it_dp_o_pd_T1?ie=UTF8&coliid=I2CTU5Q76JN7AW&colid=CCYZRSRZM3G
    I haven't actually tried it myself but it has a good reputation and gets very good reviews.
    I have used many (most) of the Blue microphone range, especially the blueberry and the woodpecker (fabulous mic) these are xlr balanced rather than USB but the build quailty and diaphragm/enclosure design is first rate. Not quite Neumann standard but, not at all Neumann prices. Good choice.

  • Report a problem not working

    Hey,
    I want to request a refund on one of the apps I bought.
    However when I click the "Report a problem" button within purchase history, I get taken to a page on my browser on the Apple website, which says "Hmm, the page you're looking for can't be found."
    I'd greatly appreciate some help, thank you!

    You realize Apple doesn't have any interest in allow millions of users to Report a problem in such an easy way, right? So they will not bother to fix this issue. Report a problem is a feature not working in many ways most of the time. And that's for sure on purpose. At least I haven't see it working in the last couple of years.

  • Hello! i have a problem, not working flash player on a Mountain Lion 10.8.4

    hello! I have a problem, use Mountain Lion 10.8.4 and my flash player not work now. I was install more other version from official page Adobe but any result. Pls Help me.

    Chrome comes with built-in Flash. That is the difference.
    Try this.
    1. System Preferences >Other/ Flash Player> Advanced >  Delete  All
      2. Install Adobe Flash Player.
        http://get.adobe.com/flashplayer/
        Quit Safari.
        Restart computer. Relaunch Safari.

  • Reinstalling photoshop 5.0  problems  not working

    I Installed Windows 8 and had to reinstall Photoshop 5.0 (yeas it is old but I know how it works) I have tried for three hours with meny different ideas but it still dows not work. Help!

    What exactly happens when you try?
    Photoshop 5.0 (from 1998) or Photoshop CS5 or Photoshop Elements 5?
    Screenshots, error messages and error codes would all help avoid guesswork.
    My best guess is that your version and Windows 8 are not compatible and an upgrade may be required.

  • Style declaration in mobile app problems (not working)

    Hello,
    In a simple mobile Flex app, I have a simple View that has a styleName assigned to a VGroup within it. The decleration is within the same view (for sake of trying to make this work, but it's in an external css if I figure out a way to make this work).
    The padding's I'm assigning are just NOT working at all. Nothing. While if I specify in the VGroup directly it's paddingTop or another style, it works fine
    Weird behavior.
    Here's the View:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Style>
            .myGroup {
                paddingTop:200;
                paddingLeft:300;
                paddingRight:30;
        </fx:Style>
        <s:VGroup styleName="myGroup">
            <s:Label text="Hello" />
        </s:VGroup>
    </s:View>
    Anyone have an idea why ?
    I'm using Flex 4.6/AIR 3.6 at the moment, tried it with Flex 4.9.1/AIR 3.4 too, same behavior.
    Is this a bug ? Am I doing something wrong ? Is there a hack/trick to make this work other than specifying the styles directly in the MXML ?
    Thanks.

    Just realized that the paddings in the VGroup aren't styles anymore but are properties. Damn those spark components
    I guess that's why, and I find it's a bummer. I know I could hack this, but damn me!

  • I brought 4 iphones 2 have technical problem not working

    I brough 4 iphone 6 out of which 2 phones are not working . Its a stupid quality iphone is maintaining now a days after waiting for 30 days for delivery. they deliver a product which is not worth to wait its horrible experience with iphone
    <Personal Information Edited by Host>

    Do you have a technical question? This is a user to user forum. Apple is not here. We can help you with technical questions. We cannot help you with your dissatisfaction with your product.
    Sorry,
    GB

  • Power shell command not working in Power shell ISE

    I was looking for guidance on a problem I was having and found a post from
    Bigteddy on TechNet that had this command
    Get-ADUser -Identity sam -Properties memberof | select -ExpandProperty memberof
    I kept trying it many ways and it always fails in power shell ISE. 
    I get the below output
    The term 'Get-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
    the name, or if a path was included, verify that the path is c
    orrect and try again.
    At line:1 char:11
    + Get-ADUser <<<< 
    -Identity rwhite -Properties memberof | select -ExpandProperty memberof
    + CategoryInfo         
    : ObjectNotFound: (Get-ADUser:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
    I put the same command in the power shell module window and it works perfectly
    Any idea how I can make this work for striping purposes in power shell ise
    ronald white

    Import-Module ActiveDirectory
    If that returns an error, chances are that you do not have the module on your computer.  You can verify that by running
    Get-Module -ListAvailable
    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP
    Engineering Efficiency
    @Rich_Prescott
    Windows System Administration tool 2.0
    AD User Creation tool

  • Hardcode password in a do shell script not working

    I have been trying to solve something i have wanted to do for a long time, that is get a script that changes the ammount of time before the display goes to sleep. I tried GUi scripting but in system preferences the changes made to the slider did not stay. So i have now come onto a do shell script. Found below. I would prefer to just hardcode my password into it however this does not seem to work. Any ideas ?
    set exitflag to false
    try
    repeat until exitflag is true
    set {text returned:Sleeptime, button returned:sleepstate} to (display dialog "Minutes before display sleep" & return & "Between 1 and 180 mintues" & return & "Greater than 180 means never sleep" default answer "1" buttons {"Cancel", "OK"} default button 2)
    set Sleeptime to Sleeptime as number
    if Sleeptime is less than 1 then
    set exitflag to false
    else if Sleeptime is greater than 180 then
    set Sleeptime to 0
    set exitflag to true
    else
    set exitflag to true
    end if
    end repeat
    end try
    set Sleeptime1 to Sleeptime as string
    set Sleeptime1 to quoted form of Sleeptime1
    set psswd to quoted form of "XXXXX"
    do shell script "sudo pmset -a displaysleep " & Sleeptime1 password psswd
    set pete to do shell script "sudo pmset -g"
    set xx to text -2 thru -1 of pete
    if xx - Sleeptime = 0 then
    tell application "SEC Helper"
    show screen message "Worked:" & return & xx & " mintues"
    end tell
    else
    tell application "SEC Helper"
    show screen message "Failed!"
    end tell
    end if

    1) don't use 'sudo' in a 'do shell script'. It isn't necessary and will sometimes break.
    2) do not use 'sudo' in a 'do shell script'
    3) do not use... I'm sure you get the idea.
    It is not necessary to use 'sudo' in a 'do shell script' command. 'do shell script' itself takes care of the authentication element when you use 'with administrator privileges'. Therefore the appropriate way of doing this is:
    <pre class=command>do shell script "pmset -g displaysleep " & sleeptime1 with administrator privileges password psswd</pre>
    If you omit the 'password psswd' element the user will be prompted to authenticate using the standard system authentication dialog.
    The problem you're running into is that the 'password' parameter is only valid when you use 'with adminitrator privileges', and is therefore getting ignored in your current script.

  • Keyboard problems, not working keys and different connection with letters

    PLEASE HELP ME, The background is this: Yesterday I have done for the first time the time machine with my external hardisk, and I try to delete also all remains documents of windows from virtual machine Parallel (I delete it after trial version and I still have windows data in the mac).
    (I dont know if is connected to the problem)
    After this, this morning the keyboard start to work bad, some keys don't work, like ENTER or P or Volume Buttons, but the strange thing is that some other work differently, like pushing the left arrow it type "à".
    I try to change Mac, in order to understand if is a software problem, but nothing, it didnt work also on different computer.
    It's not a keyboard lenguage problem as you can think, I changed, lenguage, and nothing, in fact this does not explain why some keys dont work,
    In the keyboard visor, I can see which key works and which not, and some like, down arrow, is perennially insert, and furthermore, up volume work as backspace.
    So, a series of strange problems.
    -keys that dont work
    -wrong connection (key-letters)
    -and keys always "ON"
    I'm sure that no liquid went on the keyboard, and the keyboard is new, (less than 6 month, bought at Apple store)

    Ok, I try again, and I followed perfectly the process, the "UTILITY DISC PAGE" was due to the fact that the "P" button doesnt work, therefore, it get just option+cmd+R
    Oh, really this is very strange. I try this keyboard on an other mac and it didnt work (it fail the configuration process because the "ENTER KEY" doesnt work)
    I try also a USB keyboard on my mac and it was all OK.
    So, it seems to be a software problem of my bt keyboard, there isnt a way to reset? I'm worry about match again the bt because it will ask me to type numbers and then ENTER and if the keyboard will not be fixed, Im without keyboard... now I can use it and when I need some key that dont work, I use the virtual keyboard.
    Guys, what do you suggest to do? The keyboard is in warranty but the bill is in Italy, now I'm in UK, the apple store could replace it without the bill?

  • Stuffit problem -- not working?

    I'm downloading stuff, like .zip files, it lets me unstuffit, but nothing happens. It doesn't prompt me as to where to unzip the file, though I have it set up to do that. I double click the zipped file, I see a little graphic like something's about to happen, but nothing happens. Any idea why this might not be working? Thanks.

    The latest version is 11.0.2
    Try dumping the preference file/s for Stuffit.
    Reinstall Stuffit, the Stuffit engine might have a problem.

  • Trying to reinstall/download software to correct problems -- not working

    Main problem: I click on iPhoto and get (after long wait) "iPhoto unexpectedly quit." Thought there was a problem with software so I tried reinstalling same version of iPhoto (4.0.3) (download from apple) and it says "couldn't install on this computer because couldn't find 4.0 or 4.0.1" -- but 4.0.3 is there listed in the Applications menu. I didn't uninstall it. It worked fine last night -- I was trying to send photos to Walgreens to print. I turned off the computer completely (not just sleep) and this morning, iPhoto doesn't work.
    Problems also with Quicktime -- message was that it was an old version and I could see that 4.0 was there but 7.0 was there also. Somehow that got corrected and I can access the most recent version of Quicktime.
    Also having problems with Classic -- it loads to a certain point and then stops. Reinstalling Classic from my original CDs did not help. I've also reinstalled OS X (10.3.9) (download) and that didn't solve any of the above problems either.
    I hope you all out there can give me some advice.
    Karen

    Those permissions will always be "corrected". That is not the source of your problem.
    Just to review you have done the following;
    •Booted from the install disk and repaired it. No problems found.
    •Reparied permissions no effect
    •Booted safe mode and it had no effect
    •Installed the 10.3.9 update again and no effect
    The only other thing that I can think of is to try logging in as another user. Go to Prefences/Accounts and create a new user. Call it test user or something. Give it a simple password. You are not going to store anything important there so you don't care if anyone has access to that account. Log out of your normal account(your user name) and log in as the new user.
    This will determine if the problem is in your user account or if it is a global system problem. If the new test user has no problems with iphoto, quicktime, or classic then the problem is in your user account.
    If the new test user has the same issues and your user info is backed up then the next step is an archive and install. 90% of the archive and installs go with no problem but there is always a risk of loss of user data so it is best to be safe. You would want to preserve the user preferences and settings in the archive and install process but only if you have verified that a test user has the same problems.

  • Scheduled Task for Exchange Management Shell is not working

    I am using a command in exchange management shell to get some information of mailbox users.
    When I run it form the exchange management shell it works fine without any issues. However when I schedule it using the Task Scheduler it doesn't work and the Last Run Result output is 0X1.
    The General settings are Run Whether user is logged on or not and Run with Highest Privileges.
    Please note that I have not saved the command. I have directly added it in the Add arguments field.
    Please help.

    Hi,
    For Windows Task related issues, I suggest we post it on Windows Server forum:
    http://social.microsoft.com/Forums/en-US/home?category=windowshomeserver
    Thanks,
    Simon Wu
    TechNet Community Support

  • Shell script not working

    Hi
    All,
    I have oracle 9i and 10g on unix. now i have 920.env and 1020.en file to set p respective enviornment.
    when I excecute this commnad
    . $HOME/920.env from the shell prompt it is working fine. and also same for 1020.env .
    Now same command . $HOME/920.env i am putting in shell script and trying to execute that script but it is not executing.
    i don't know what to do.
    Thank you
    vishal

    now as i understand that statement is executing but it's scope is only with in the script. when it complete it's execution all varialble reset to it's by defualt .profile so that statement in the script set variable with in the scope of the script only.
    Thanks for your help
    Vishal

Maybe you are looking for