Search Results

Search found 29612 results on 1185 pages for 'script console'.

Page 40/1185 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Unknown error sourcing a script containing 'typeset -r' wrapped in command substitution

    - by Bernard Assaf
    I wish to source a script, print the value of a variable this script defines, and then have this value be assigned to a variable on the command line with command substitution wrapping the source/print commands. This works on ksh88 but not on ksh93 and I am wondering why. $ cat typeset_err.ksh #!/bin/ksh unset _typeset_var typeset -i -r _typeset_var=1 DIR=init # this is the variable I want to print When run on ksh88 (in this case, an AIX 6.1 box), the output is as follows: $ A=$(. ./typeset_err.ksh; print $DIR) $ echo $A init When run on ksh93 (in this case, a Linux machine), the output is as follows: $ A=$(. ./typeset_err.ksh; print $DIR) -ksh: _typeset_var: is read only $ print $A ($A is undefined) The above is just an example script. The actual thing I wish to accomplish is to source a script that sets values to many variables, so that I can print just one of its values, e.g. $DIR, and have $A equal that value. I do not know in advance the value of $DIR, but I need to copy files to $DIR during execution of a different batch script. Therefore the idea I had was to source the script in order to define its variables, print the one I wanted, then have that print's output be assigned to another variable via $(...) syntax. Admittedly a bit of a hack, but I don't want to source the entire sub-script in the batch script's environment because I only need one of its variables. The typeset -r code in the beginning is the error. The script I'm sourcing contains this in order to provide a semaphore of sorts--to prevent the script from being sourced more than once in the environment. (There is an if statement in the real script that checks for _typeset_var = 1, and exits if it is already set.) So I know I can take this out and get $DIR to print fine, but the constraints of the problem include keeping the typeset -i -r. In the example script I put an unset in first, to ensure _typeset_var isn't already defined. By the way I do know that it is not possible to unset a typeset -r variable, according to ksh93's man page for ksh. There are ways to code around this error. The favorite now is to not use typeset, but just set the semaphore without typeset (e.g. _typeset_var=1), but the error with the code as-is remains as a curiosity to me, and I want to see if anyone can explain why this is happening. By the way, another idea I abandoned was to grep the variable I need out of its containing script, then print that one variable for $A to be set to; however, the variable ($DIR in the example above) might be set to another variable's value (e.g. DIR=$dom/init), and that other variable might be defined earlier in the script; therefore, I need to source the entire script to make sure I all variables are defined so that $DIR is correctly defined when sourcing.

    Read the article

  • How to add Sharepoint Powershell to Console2

    - by BGM
    Salvete! I want to add the Powershell Console for Sharepoint to the tablist in Console2. I already have plain Powershell, but I want the Sharepoint Powershell snapin added automatically. If I look at the properties of the Sharepoint Powershell Console shortcut, I see this: C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' " but that doesn't work in Console2, so I tried this, which doesn't work either: C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\psconsole.psc1" -NoExit " & ' C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\\sharepoint.ps1 ' " Whenever I try, it will load Powershell, but not the Sharepoint Console. I get this: Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.SharePoint.PowerShell' is not installed on this machine. At C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\POWERSHELL\Registration\SharePoint.ps1:3 char:13 + Add-PsSnapin <<<< Microsoft.SharePoint.PowerShell + CategoryInfo : InvalidArgument: (Microsoft.SharePoint.PowerShell:String) [Add-PSSnapin], PSArgumentException + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand I tried this out, too. Anybody know?

    Read the article

  • hp ilo "remote console undefined"

    - by javapowered
    After upgrading my server (HP DL360p Gen8) to the latest ILO 4.30 I have such error What should I do and how to fix my problem? I do not have physical access to my server and so now I have no access at all (I still have ILO with no remote console) I think probably I should use "back-up" copy of ilo if it stored on server... or should I reupload some another ILO version? upd I've noticed that undefined link is "https:///html/undefined", i think I can try "hack" and just type direct link to "remote" page, but i do not have an address. It should be something like "https:///html/remote.html" Probably someone, who has access to ilo, can give me a link?

    Read the article

  • Stack overflow in xp cmd console

    - by Dave
    I am using an older program whose source code I cannot see. I am using the cmd.exe console in windows xp. The program ran with no problems on an xp machine last year, while a stack overflow code 2000 error was observed on a different xp machine (easy fix - use the machine that works). I tried running the program on the previously working machine lately, and now am getting the same error. No changes to the os were made and I did not change the service pack version. Any ideas on how to get around this stack overflow error so I can use the program? Dosbox will at least open the program, however it does not run to completion. Thanks!

    Read the article

  • Why does Ubuntu's Nautilus display a folder called "Examples" while the console displays "examples.desktop"

    - by broiyan
    These folders occur at /home/username. How does this name discrepancy arise? (Uppercase E versus lowercase e.) It seems to be a shortcut to /usr/share/example-content. How can I delete /usr/share/example-content/Ubuntu_Free_Culture_Showcase without using the command line? One possible answer is to make a privileged Nautilus using something like these SUSE instructions (link below). Unfortunately "gnomesu nautilus" gives me a "gnomesu: no such file" message and "sudo nautilus" does not do anything when added to the properties of the Launcher. Update: "sudo nautilus" from the console let's me delete but there is a mess of error messages. http://forums.opensuse.org/english/get-technical-help-here/how-faq-forums/unreviewed-how-faq/426153-how-nautilus-super-user-mode-gnome.html

    Read the article

  • Start script on network connect

    - by Nate Mara
    I am trying to get a GNU/Linux Bash script to run as soon as a network connection is established on my Raspberry Pi. I tried following the instructions on several pages: I have tried adding my script to /etc/network/if-up.d and running sudo chmod ugo+x on the file. I have tried adding the line post-up <path/to/script.sh> to /etc/network/interfaces I am really quite clueless here. More info: The script runs fine when manually run, here it is: http://pastebin.com/UJvt5HYU (I did remove my personal info (email addresses, passwords), but other than that, the script is unchanged. This script also uses the sendEmail program (can be found at http://caspian.dotconf.net/menu/Software/SendEmail/).

    Read the article

  • "Fast link detected" warning in GP management console

    - by ???????? ??????
    There is a message that is shown in every report i make in Group Policy Results section of Group Policy Management Console, saying that "A fast link is detected". I followed the link in the waring, but after I read the page several times, I concluded, that I can ignore the warning. However, I noticed that the group policies are not applied when security filtering is used untl "gpupdate /sync" is executed... Is this related to the fast sync? In general, can somebody explain me the consequences of fast links briefly?

    Read the article

  • Windows serial console

    - by MikeyB
    How do I enable a serial console on Windows (2008 and/or 2012) such that I can log into it like the Good Old Days of Real Servers and issue provisioning commands, ideally via PowerShell? $ cu -l /dev/ttyS0 Connected. Welcome to ad1.adlab.brazzers.com Microsoft Windows [Version 6.1.7601] Copyright (C) 2009 Microsoft Corporation. All rights reserved. Login: Administrator Password: PS C:\Users\Administrator> New-NetIPAddress –InterfaceAlias eth0 –IPv4Address 192.168.101.11 –PrefixLength 24 -DefaultGateway 192.168.101.1 PS C:\Users\Administrator>

    Read the article

  • How to run bash script from windows using plink on linux

    - by user128877
    I'm trying to run a simple bat file from windows that will run a bash script on linux machine. The bash script is located on the linux machine. For example: I'm trying to run this bat file from windows plink.exe -pw <password> root@<ip> bash -c "/root/script.sh" Result: When running from windows the cmd is stuck forever when running the specific script (/root/script.sh) from the linux machine it's working just fine. The script contain ruby code and I'm using RVM

    Read the article

  • echo newline character not working in bash

    - by Bashuser
    I have bash script which has lots of echo statements and also I aliased echo to echo -e both in .bash_profile and .bashrc, so that new lines are printed properly for a statement like echo 'Hello\nWorld' the output should be Hello World but the output I am getting is Hello\nWorld I even tried using shopt -s expand_aliases in the script, it doesn't help I am running my script as bash /scripts/scriptnm.sh; if I run it as . /scripts/scriptnm.sh I am getting the desired output...

    Read the article

  • Default prolog for all ZSH scripts?

    - by Igor Spasic
    I have a file that contains several helper functions, meant to be used only in other ZSH scripts. I do not want them to be loaded with my profile. To make these functions available in my script, I would need to source this file. Is it somehow possible to have automatic prolog script (or pre-script) loaded before all my ZSH scripts? My current idea is to alias -s zsh extension to custom function that those all this for me: concatenate prolog file and current script calls zsh with such modified input but for now I am somehow not able to do this (haven't sleep for almost a day). Please, does anyone have a working solution?

    Read the article

  • Windows server 2008 r2 console stuck at "waiting for user profile service"

    - by support
    Hi, I have a windows 2008 R2 server, running on dell poweredge t300. Using hyper-v to run a windows 2008 R2 server also. Suddenly, today, my virtual console (on the virtual copy of windows 2008 server r2) will not let me login as administrator. It starts to login but then sticks at the message: Please wait for the User profile Service and is unresponsive to keypresses (incl ctrl-alt-del). The only way out is a crash. It starts up in safe mode without networking ok but not in safe mode with networking. Any suggestions on how to fix this would be appreciated Thanks

    Read the article

  • Not able to find scripts present in /etc/profile.d directory [on hold]

    - by priya
    I am using Red Hat Linux 6.0 ... using davinchi board. I have to change system clock resolution so I am changing (HZ) env var. For this I have written script so that I can change HZ = 1000 n insert that script in /etc/profile.d and write code for loop in /etc/profile so that while running as usual /etc/profile can load the scripts present in /etc/profile.d. But when I am logging into the system at root level then showing error as "-bash: ./etc/profile.d/resolution.sh(my script name): No such file or directory Also here why it is showing ./etc and not /etc . Is something related to that?? Also I tried to add script in /etc/init.d but still no change in value of HZ takes place. Please tell where to change so that this env var can get changed. The script(resolution.sh) written has :- #!/bin/bash export HZ=1000 The content of /etc/profile which I entered is: if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then .$i fi done unset i fi And the output of grep command is -rw-r--r-- 1 root root 535 Feb 4 2004 profile -rwxr-xr-x 2 root root 4096 Feb 2 2004 profile.d

    Read the article

  • Terminate child processes on ctrl-c

    - by jackweirdy
    In tiny core linux, I have the following script: #!/bin/sh # ~/.X.d/freerdp.sh rdp(){ while true do xfreerdp -f [IP Address] done } rdp & It's pretty simple; when X starts up and checks the .X.d directory (as is the case in tiny core) it finds and executes this script. The script starts up freerdp and keeps a connection open to the server by restarting it whenever it closes. As you can see from the rdp & line, the function is run in the background to allow X to continue its startup routine. The problem is that whenever I cancel X with a Ctrl-Alt-Backspace the rdp process doesn't die. I'm looking for a way to kill the process as soon as X finishes, either through: A) a script, executed on X closing, which kills the process or B) by modifying the script to check the return value of the xfreerdp command. NB - if the solution does check the return value, it must only end if the command fails to open the X display. For that reason, if you could point me to a reference for xfreerdp return values I'd be grateful.

    Read the article

  • No virtual console on ubuntu 12.10

    - by Buzzzz
    When I try to do a ctr-alt f(1-6) in ubuntu 12.10 I only get a black screen with a blinking cursor but no login prompt. Any ideas on what could be wrong? It is a fresh install of 12.10 using a amd radeon 5850 graphics card. i have tried different things in my /etc/default/grub but at the moment I use the following: # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vga=normal" #GRUB_CMDLINE_LINUX="vga=0x0376" #RUB_CMDLINE_LINUX_DEFAULT="vga=0x014c" #GRUB_CMDLINE_LINUX="vga=0x014c" #GRUB_GFXPAYLOAD_LINUX=1600x1200x24 # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console

    Read the article

  • "Exchange Management Console" 2007 can't connect to Active directory on load : get-ExchangeServer

    - by Dragouf
    Since a little time I can't use Exchange Management Console on an exchange 2007 server because of a message which tell me that get-ExchangeServer return that active directory of my server is available. My config is : Windows server 2008 sp2 wit roles : DNS IIS Active Directory RAS and Exchange server 2007. Here is a screenshot of the error message (I run windows server 2008 french edition sorry) : in english : The following error(s) were reported while loading topology information: get-ExchangeServer Failed Error: Active Directory server <theserver> is not available. Error message: A local error occurred. A local error occurred. get-UMServer Failed Error: Active Directory server <theserver> is not available. Error message: A local error occurred. A local error occurred. Anyone know from where this problem is comming and how to resolve it ?

    Read the article

  • Exchange Management Console Listing Extra Servers

    - by Zak G
    I recently decommissioned an Old Exchange 2003 server. Prior to the decommissioning, the environment consisted of 2 EXCH 2010 and that one EXCH 2003 server. I went through all the steps listed in Microsoft documents and online in how to remove the server completely (pruning the AD and all that jazz). When I go to Exchange Management Console it still lists 3 total servers in the "Server Summary" column in the Organizational Health tab. When I click manage servers, it only lists the 2 EXCH 2010 servers. I am aware this is only a cosmetic issue but I would appreciate it if anyone can share some advice on how to fix the issue.

    Read the article

  • Updating a script currently being ran by Task Scheduler on Windows

    - by orangechicken
    I have a scheduled task that runs a script on a ahem schedule ahem that updates a local git repo. This script is a file in this local git repo. Currently, what I'm seeing is that the script is ran, git complains that permissions are denied to write to file which actually results in the script being deleted! The next time the scheduled task runs the script file is now missing! How can I ensure that when I pull changes to this script from the repo that the file is actually updated?

    Read the article

  • Need info on scripts and Autoforward through Exchange Server in Outlook 2010

    - by user103037
    I am using the below information to auto-forward my work emails to my BB via a gmail account. The script works fine. But my work email ask's for every email to send either classifield or unclassified. What and where would I add into the below script to autoforward unclassified? I have written some VBA script to do this bypass the server's disabling of auto-forward. Basically it mimics the user forwarding the email rather than the server doing an auto-forward. It's pretty simple: Sub AutoForwardAllSentItems(Item As Outlook.MailItem) Dim strMsg As String Dim myFwd As Outlook.MailItem Set myFwd = Item.Forward myFwd.Recipients.Add "[email protected]" myFwd.Send Set myFwd = Nothing End Sub It's beyond the scope of this post to give detailed instructions, but here's a summary: Add the above code in the Visual Basic editor of Outlook (Alt-F11 should get your started). Be sure to change [email protected] to the address where you want the mail to go Tell Outlook to run this code for each inbound message (Tools - Rules and Alerts - New Rule - Check Messages when they arrive - Next - YES - Checkbox "Run a Script" - Then select the script you just created. Now Outlook should automatically forward each email you receive, but it won't be blocked by the Admin as an "Auto-forward".

    Read the article

  • Windows: How to add batch-script action to Right Click menu

    - by ervingsb
    I have a few programs that creates temp files or backup files or similar files that are not important. For example, GVim for Windows by default creates a backup file in filename.txt~. I sometimes need to clean up a dir and remove all these files. I have made a simple .bat file for this. However, it is cumbersome to have to start up cmd, navigate to the folder, run the script. Especially since this is a script that I would like to run often on various folders. And I do not want to copy the script to multiple folders, as this would be a maintenance nightmare. So, I was thinking, that the best solution would be to add a Right Click menu item that allows me to run the script. So that I can right click on a folder in Explorer and click Cleanup and then have my script run on this folder. So my question is: How do I add a right click menu action that runs a custom batch script?

    Read the article

  • virsh console and tty size

    - by pehrs
    I have a virtualization server to which I connect over ssh. If I now change the size of the window it will automatically propagate to the server. It's most easily seen using stty -a, checking the columns and row values. I then use virsh console to connect to the serial interface on a KVM based virtual machine. When I now change the size of the window it does not propagate to the virtual server. This is most easily seen by checking stty -a, which is not updated on the virtual machine when I change window size. This means that line breaks does not work correctly in the terminal and any application that relies on window size for formatting (emacs, man, etc) gets messed up unless the window size on the client matches the default size on the server. A workaround is to manually set the window size to match the client window using stty, but I wonder if there is any way to get this information to propagate and set the window size in the virtual machine automatically.

    Read the article

  • GPO Startup Script can't modify HKU Registry?

    - by pepoluan
    I've been scratching my head with my current problem. You see, I have this Startup Script that I pushed via GPO. Problem is, although the script starts alright (I see the event it created when starting in the event log), it always fails when trying to enumerate and/or modify registry settings under HKU. If I login as administrator and execute the script manually, it works! If I startup a Command Prompt as SYSTEM (using the "at" workaround) and execute the script manually, it also works! If I reboot... the script always fails. Can anyone shed a light on my problem? Additional information: This script injects some registry values for the Local Administrator (i.e., S-1-5-21-etc etc etc-500), so I'm not sure that it's doable via GPP, not to mention that since nearly all the workstations in my domain are still using XP, so no guarantee of GPP support.

    Read the article

  • Text on Cisco ASA console is garbled/missing letters

    - by Some Linux Nerd
    I've actually looked up a number of solutions for this problem and none of them work. There's this Cisco ASA 5505 that I'd like to use, that outputs mildly garbled text with missing characters. I did some googling and found that the most likely problem is a bad baud rate, so I tried all the baud rates, 7N1, 8N2... basically every possibility minicom had. Then I figured (since I can type ok, just not read) that if I factory reset it that it would fix whatever is set wrong with the terminal. That didn't work either. This usb-db9 adapter and console cable work fine on the catalyst switch in our office. My serial settings are 9600 8N1 with no flow control. Anyone know how to fix this? I have an example of the text on pastebin: http://pastebin.com/MAJF0mVU - it's just lots of "Dfaut cnfiuraionfil cotais 1enty." instead of "Default configuration blah blah"

    Read the article

  • How to add extensions to a lot of files using content of each file?

    - by v8media
    I've got over 10,000 files that don't have extensions from older versions of the Mac OS. They're extremely nested, and they also have all sorts of strange formatting and characters. They don't have file types or creator codes attached to them any longer. A great deal of these files have text in the file that will let me determine extensions (for example Word.Document.8 is in every file created by that version of Word, and Excel.Sheet.8 in every file created with that version of Excel). I found a script that looks like it would work for one of these file types at a time, but it erases parts of filenames after nefarious characters, which is not good. find . -type f -not -name "." -print0 |\ xargs -0 file |\ grep 'Word.Document.8' |\ sed 's/:.*//' |\ xargs -I % echo mv % %.doc So, two questions from that: One is, should I clean the characters in the filenames first, or programmatically deal with those in the script in order to leave them the same? As long as I lose no information from the filenames, I don't see a problem cleaning out slashes and other problem characters. Also, if I clean the filenames, there are likely to be duplicates, so any cleaning script would have to add something like "-1" before the extension to make sure nothing gets lost. 2nd question is how do I change the script so that it will look for more than one file type at the same time and give each the proper extension? I'm not tied to this script, but it is understandable, which is a pro. Mac OS X 10.6 is installed on this file server, but I've got access to any recent versions of OS X. Thanks, Ian

    Read the article

  • How to know that my IP is invalid

    - by PeterMmm
    I have a script running that will start up an interface with a new IP. If the script comes up with an IP that is already in use i am in trouble. Is it possible that the script set up the new Ip, detects that this IP is already in use and then check the next one, until it finds an ip that works ? B=192.168.1. I=1 while [ "$I" != "256" ] do ifconfig eth0:1 $B.$I # check here that IP is Ok ! let "I=I+1" done

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >