Search Results

Search found 28350 results on 1134 pages for 'command switch'.

Page 4/1134 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Retrieve a command from another, remote bash session

    - by Oli
    So I was on our laptop, SSH'd into my desktop, dropping some mad bashfu skill. There was one command I ran which was particularly skilful. I'm now about minute walk from the laptop and I really want that command here on my desktop, so that I can run it again. I realise I've already spent more time that it would have taken to rewrite it, but this has raised a common issue I have with bash history. I know I can force it to update each command, but I haven't... so: Is there any way to get a history from a different, live bash session?

    Read the article

  • Input to program without command-line arguments

    - by Core Xii
    Let's assume that there are no command-line arguments. How do you pass input data to a program? I'm thinking you'd write the input to a file with a specific name, such that the program knows to open and read it as input. However, how would one discover the name of that file? Usually, running a command-line program without arguments or with some standard help argument (e.g. \?) produces some instruction on how to use it. But given an environment with no command-line arguments, how does one discover how to operate a program?

    Read the article

  • C# and T-SQL command-line Utility

    - by Chad Sellers
    Group, Part 1: I'm currently working on a command line utility that can take args and update a local database. The only issue I have is once i established a "Data connection"..how can I use those args for queries and searches. For example: ~//arrInput.exe "parm1" "pram2" "pram3" Part 2: I would like to take in command line args and use them as input parms for a "stored proc". Once finished execution....used the same inputs crate a log file. For example output file: mm-dd-yyyy hh:mm:ss - pram1,pram2,... pram1: updated/failed pram2: update/failed Thanks, Chad

    Read the article

  • Modify cmd.exe properties using the command prompt

    - by CodexArcanum
    Isn't that nicely recursive? I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more! Here's what I know how to set from .bat: Colors = (color XY) where x and y are hex digits for the predefined colors Prompt = (prompt $p$g) sets the prompt to "C:\etc\etc " the default prompt Title = (title "text") sets the window title to "text" Screen Size = (mode con: cols=XX lines=YY) sets the columns and lines size of the window Path = (SET PATH=%~d0\bin;%PATH%) sets up local path to my tools and appends the computer's path So that's all great. But there are a few settings I can't seem to set from the bat. Like, how would I set these up wihtout using the Properties dialogue: Buffer = not screen size, but the buffer Options like quick edit mode and autocomplete Popup colors Font. And can you use a font on the portable drive, or must it be installed to work? Command history options

    Read the article

  • Advanced command line argument parsing in Java?

    - by Bishop87
    Does anyone have any java examples for parsing a series of command line arguements in a robust way? I'm looking to be able to handle something like: java myapp [-l language] [-d int] [-f file1 file2 file3] I want to do this in a robust way so I can provide logical error messages to the user if they mistake a command line-option. Some of these options I'd like to make optional, etc, etc. Also, the -f file list should be able to handle a list of files. Is there some library out there to assist me in handling this?

    Read the article

  • Using 'Copy as cURL' from Chrome in windows command line

    - by user2029890
    So, Google Chrome as this great 'copy as cURL' option under 'Network' of the Chrome DevTools. Works great in command lines for linux but not in windows. Apparently it has something to do with the single quotes as the error I get is protocol 'http not supported In other words its reading that single quote. Is there a simple way to make this formatable for windows? I tried replacing all the single quotes with double quotes but then nothing happens at all. The command is: curl 'http://www.test.com/login/' -H 'Cookie: PHPSESSID=7dvb25maaaaaa9d7bbbbbc3f6' -H 'Origin: http://www.test.com' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Host: www.test.com' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: http://www.test.com/login/' -H 'Connection: keep-alive' --data 'loc=&login=user%40test.com&password=password&submit1=Sign+In' --compressed Thank you

    Read the article

  • How to Reuse Your Old Wi-Fi Router as a Network Switch

    - by Jason Fitzpatrick
    Just because your old Wi-Fi router has been replaced by a newer model doesn’t mean it needs to gather dust in the closet. Read on as we show you how to take an old and underpowered Wi-Fi router and turn it into a respectable network switch (saving your $20 in the process). Image by mmgallan. Why Do I Want To Do This? Wi-Fi technology has changed significantly in the last ten years but Ethernet-based networking has changed very little. As such, a Wi-Fi router with 2006-era guts is lagging significantly behind current Wi-Fi router technology, but the Ethernet networking component of the device is just as useful as ever; aside from potentially being only 100Mbs instead of 1000Mbs capable (which for 99% of home applications is irrelevant) Ethernet is Ethernet. What does this matter to you, the consumer? It means that even though your old router doesn’t hack it for your Wi-Fi needs any longer the device is still a perfectly serviceable (and high quality) network switch. When do you need a network switch? Any time you want to share an Ethernet cable among multiple devices, you need a switch. For example, let’s say you have a single Ethernet wall jack behind your entertainment center. Unfortunately you have four devices that you want to link to your local network via hardline including your smart HDTV, DVR, Xbox, and a little Raspberry Pi running XBMC. Instead of spending $20-30 to purchase a brand new switch of comparable build quality to your old Wi-Fi router it makes financial sense (and is environmentally friendly) to invest five minutes of your time tweaking the settings on the old router to turn it from a Wi-Fi access point and routing tool into a network switch–perfect for dropping behind your entertainment center so that your DVR, Xbox, and media center computer can all share an Ethernet connection. What Do I Need? For this tutorial you’ll need a few things, all of which you likely have readily on hand or are free for download. To follow the basic portion of the tutorial, you’ll need the following: 1 Wi-Fi router with Ethernet ports 1 Computer with Ethernet jack 1 Ethernet cable For the advanced tutorial you’ll need all of those things, plus: 1 copy of DD-WRT firmware for your Wi-Fi router We’re conducting the experiment with a Linksys WRT54GL Wi-Fi router. The WRT54 series is one of the best selling Wi-Fi router series of all time and there’s a good chance a significant number of readers have one (or more) of them stuffed in an office closet. Even if you don’t have one of the WRT54 series routers, however, the principles we’re outlining here apply to all Wi-Fi routers; as long as your router administration panel allows the necessary changes you can follow right along with us. A quick note on the difference between the basic and advanced versions of this tutorial before we proceed. Your typical Wi-Fi router has 5 Ethernet ports on the back: 1 labeled “Internet”, “WAN”, or a variation thereof and intended to be connected to your DSL/Cable modem, and 4 labeled 1-4 intended to connect Ethernet devices like computers, printers, and game consoles directly to the Wi-Fi router. When you convert a Wi-Fi router to a switch, in most situations, you’ll lose two port as the “Internet” port cannot be used as a normal switch port and one of the switch ports becomes the input port for the Ethernet cable linking the switch to the main network. This means, referencing the diagram above, you’d lose the WAN port and LAN port 1, but retain LAN ports 2, 3, and 4 for use. If you only need to switch for 2-3 devices this may be satisfactory. However, for those of you that would prefer a more traditional switch setup where there is a dedicated WAN port and the rest of the ports are accessible, you’ll need to flash a third-party router firmware like the powerful DD-WRT onto your device. Doing so opens up the router to a greater degree of modification and allows you to assign the previously reserved WAN port to the switch, thus opening up LAN ports 1-4. Even if you don’t intend to use that extra port, DD-WRT offers you so many more options that it’s worth the extra few steps. Preparing Your Router for Life as a Switch Before we jump right in to shutting down the Wi-Fi functionality and repurposing your device as a network switch, there are a few important prep steps to attend to. First, you want to reset the router (if you just flashed a new firmware to your router, skip this step). Following the reset procedures for your particular router or go with what is known as the “Peacock Method” wherein you hold down the reset button for thirty seconds, unplug the router and wait (while still holding the reset button) for thirty seconds, and then plug it in while, again, continuing to hold down the rest button. Over the life of a router there are a variety of changes made, big and small, so it’s best to wipe them all back to the factory default before repurposing the router as a switch. Second, after resetting, we need to change the IP address of the device on the local network to an address which does not directly conflict with the new router. The typical default IP address for a home router is 192.168.1.1; if you ever need to get back into the administration panel of the router-turned-switch to check on things or make changes it will be a real hassle if the IP address of the device conflicts with the new home router. The simplest way to deal with this is to assign an address close to the actual router address but outside the range of addresses that your router will assign via the DHCP client; a good pick then is 192.168.1.2. Once the router is reset (or re-flashed) and has been assigned a new IP address, it’s time to configure it as a switch. Basic Router to Switch Configuration If you don’t want to (or need to) flash new firmware onto your device to open up that extra port, this is the section of the tutorial for you: we’ll cover how to take a stock router, our previously mentioned WRT54 series Linksys, and convert it to a switch. Hook the Wi-Fi router up to the network via one of the LAN ports (consider the WAN port as good as dead from this point forward, unless you start using the router in its traditional function again or later flash a more advanced firmware to the device, the port is officially retired at this point). Open the administration control panel via  web browser on a connected computer. Before we get started two things: first,  anything we don’t explicitly instruct you to change should be left in the default factory-reset setting as you find it, and two, change the settings in the order we list them as some settings can’t be changed after certain features are disabled. To start, let’s navigate to Setup ->Basic Setup. Here you need to change the following things: Local IP Address: [different than the primary router, e.g. 192.168.1.2] Subnet Mask: [same as the primary router, e.g. 255.255.255.0] DHCP Server: Disable Save with the “Save Settings” button and then navigate to Setup -> Advanced Routing: Operating Mode: Router This particular setting is very counterintuitive. The “Operating Mode” toggle tells the device whether or not it should enable the Network Address Translation (NAT)  feature. Because we’re turning a smart piece of networking hardware into a relatively dumb one, we don’t need this feature so we switch from Gateway mode (NAT on) to Router mode (NAT off). Our next stop is Wireless -> Basic Wireless Settings: Wireless SSID Broadcast: Disable Wireless Network Mode: Disabled After disabling the wireless we’re going to, again, do something counterintuitive. Navigate to Wireless -> Wireless Security and set the following parameters: Security Mode: WPA2 Personal WPA Algorithms: TKIP+AES WPA Shared Key: [select some random string of letters, numbers, and symbols like JF#d$di!Hdgio890] Now you may be asking yourself, why on Earth are we setting a rather secure Wi-Fi configuration on a Wi-Fi router we’re not going to use as a Wi-Fi node? On the off chance that something strange happens after, say, a power outage when your router-turned-switch cycles on and off a bunch of times and the Wi-Fi functionality is activated we don’t want to be running the Wi-Fi node wide open and granting unfettered access to your network. While the chances of this are next-to-nonexistent, it takes only a few seconds to apply the security measure so there’s little reason not to. Save your changes and navigate to Security ->Firewall. Uncheck everything but Filter Multicast Firewall Protect: Disable At this point you can save your changes again, review the changes you’ve made to ensure they all stuck, and then deploy your “new” switch wherever it is needed. Advanced Router to Switch Configuration For the advanced configuration, you’ll need a copy of DD-WRT installed on your router. Although doing so is an extra few steps, it gives you a lot more control over the process and liberates an extra port on the device. Hook the Wi-Fi router up to the network via one of the LAN ports (later you can switch the cable to the WAN port). Open the administration control panel via web browser on the connected computer. Navigate to the Setup -> Basic Setup tab to get started. In the Basic Setup tab, ensure the following settings are adjusted. The setting changes are not optional and are required to turn the Wi-Fi router into a switch. WAN Connection Type: Disabled Local IP Address: [different than the primary router, e.g. 192.168.1.2] Subnet Mask: [same as the primary router, e.g. 255.255.255.0] DHCP Server: Disable In addition to disabling the DHCP server, also uncheck all the DNSMasq boxes as the bottom of the DHCP sub-menu. If you want to activate the extra port (and why wouldn’t you), in the WAN port section: Assign WAN Port to Switch [X] At this point the router has become a switch and you have access to the WAN port so the LAN ports are all free. Since we’re already in the control panel, however, we might as well flip a few optional toggles that further lock down the switch and prevent something odd from happening. The optional settings are arranged via the menu you find them in. Remember to save your settings with the save button before moving onto a new tab. While still in the Setup -> Basic Setup menu, change the following: Gateway/Local DNS : [IP address of primary router, e.g. 192.168.1.1] NTP Client : Disable The next step is to turn off the radio completely (which not only kills the Wi-Fi but actually powers the physical radio chip off). Navigate to Wireless -> Advanced Settings -> Radio Time Restrictions: Radio Scheduling: Enable Select “Always Off” There’s no need to create a potential security problem by leaving the Wi-Fi radio on, the above toggle turns it completely off. Under Services -> Services: DNSMasq : Disable ttraff Daemon : Disable Under the Security -> Firewall tab, uncheck every box except “Filter Multicast”, as seen in the screenshot above, and then disable SPI Firewall. Once you’re done here save and move on to the Administration tab. Under Administration -> Management:  Info Site Password Protection : Enable Info Site MAC Masking : Disable CRON : Disable 802.1x : Disable Routing : Disable After this final round of tweaks, save and then apply your settings. Your router has now been, strategically, dumbed down enough to plod along as a very dependable little switch. Time to stuff it behind your desk or entertainment center and streamline your cabling.     

    Read the article

  • Connecting switch to switch to router

    - by elated
    Hello, Not sure if this is the right place to ask this question. But I have a router which connects to the internet. Now I have a switch connected to this router. I added a lot more computers so I added another switch and connected it to the first switch using a cross-over cable. As soon as I connect it to the first switch, my lights in first switch start blinking like crazy and my entire network simply stops working. The minute I remove the second switch's wire, its all fine again. What could be the problem?

    Read the article

  • Command-line to list DNS servers

    - by Anurag Uniyal
    Is there a command to list dns servers? I tried $ cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 $ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback But it doesn't list any servers, if I go to "Network GUI Tool", in Wireless section it lists "DNS 192.168.1.1 8.8.8.8 8.8.4.4" Can I get same information from command line? I am using Ubuntu 12.04 LTS

    Read the article

  • How to add GUI to command-line Ubuntu?

    - by SlimGG
    I had installed Ubuntu on a VM, with a command-line only interface, now I have had enough of command-line interface experience and plan to proceed with GUI mode. But I dont want to install a fresh copy of Ubuntu with GUI mode; I want my current [CLI] to have GUI. I have Ubuntu 12.04 LTS installed as CLI, and desired to have some light-weight (less resource consuming, slow-system friendly) GUI. What are my options and how can I accomplish this?

    Read the article

  • Make it so you can't stop command with CTRL+C

    - by Xero
    So, I was playing some Zork 1, and I went to copy some text to show a friend of mine I accidentally forgot to hold the shift key when pressing CTRL+C. This stopped the command and I lost my Zork data, is there some sort of "helpful" tip out their that I can to prevent from stopping the command when press the keys CTRL+C? Note that I'm running the game zork via Terminal (emulator), I installed it with these steps: http://www.eugenemdavis.com/playing-zork-linux-frotz

    Read the article

  • What's the command to open the Unity Dash?

    - by Scintoon
    I would like to know the command (from the Terminal) which opens the Unity dash, the reason being I want to create a desktop icon that starts the dash instead of the 'Windows Key' for keyboard-free use of the computer (I miss the old Ubuntu-Tweak effect where putting your mouse to the corner of the desktop would reveal Expo or Scale effects - by the way, is it possible to get it back?) Making a launcher (Application, Name, Command, Comment, etc) I tried the commands 'Unity', 'Dash' and other things, but I didn't manage to get it to work. I am using version 12.04

    Read the article

  • How to edit pdf metadata from command line?

    - by bdr529
    I need a command line tool for editing metadata of pdf-files. I'm using a Aiptek MyNote Premium tablet for writing my notes and minutes on this device, import them later and convert them to pdf automatically with a simple script using inkscape and ghostscript. Is there any command line tool to add some categories to the pdf's metadata, so i can find the pdf later (e.g. with gnome-do) by categories?

    Read the article

  • best command line tool to join videos

    - by user1079002
    I have used ffmpeg, but with it you have to first make mpg videos then do cat video1.mpg video2.mpg > joined.mpg and then convert to joined.mpg to joined.mp4 with ffmpeg to be able to upload on youtube. I heard there's mencoder which can join avi files without converting to mpg and using cat command. I'm making videos to upload on youtube so it needs to be avi mp4 or flv format. Which tool is the best to join videos from command line?

    Read the article

  • Having two IP Routes/Gateways of last Resort on an HP Switch

    - by SteadH
    We have an HP Layer 3 Switch that is doing IP routing between vlans. The general set up is that the switch has an IP address on each VLAN and IP routing is enabled. On our servers VLAN, we have a firewall that has a connection to the outside world. To set a IP route on the HP router, we use IOS command ip route 0.0.0.0 0.0.0.0 192.168.2.1 where 192.168.2.1 is the address of our firewall, and the zeros essentially mean to route all traffic that the switch doesn't know what to do with out the firewall as a gateway. We're in the middle of an ISP and firewall change. I set up the new firewall and ran the IOS command ip route 0.0.0.0 0.0.0.0 192.168.2.254 (the address of the new firewall). Things started working nicely. When I reviewed the configuration of the switch though, I noticed that it did not replace the previous ip route command, but just added another route. Now, I know how to remove the old firewall route (no ip route 0.0.0.0 0.0.0.0 192.168.2.1), but what is the effect of having these two 0.0.0.0 routes? Is it switch implosion? Will a server just respond back over the route it receives the request from? I've read elsewhere that having two default gateways is an impossibility by definition, but I'm curious about this situation that our switch allowed. Thanks!

    Read the article

  • How can I pass more than one command line argument via c#

    - by user293392
    I need to pass more than one command line argument via c# for a process called handle.exe: http://www.google.com.mt/search?sourceid=chrome&ie=UTF-8&q=handle.exe First, I need to run the executable file via ADMINISTRATOR permissions. This post has helped me achieve just that: http://stackoverflow.com/questions/667381/programatically-run-cmd-exe-as-adminstrator-in-vista-c But then comes the next problem of calling the actual line arguments such as "-p explore" How can I specify the command line arguments together, or maybe consecutively? Current code is as follows: Process p = new Process(); ProcessStartInfo processStartInfo = new ProcessStartInfo("filePath"); processStartInfo.CreateNoWindow = true; processStartInfo.UseShellExecute = false; processStartInfo.RedirectStandardOutput = true; processStartInfo.RedirectStandardInput = true; processStartInfo.Verb = "runas"; processStartInfo.Arguments = "/env /user:" + "Administrator" + " cmd"; p.StartInfo = processStartInfo; p.Start(); string output = p.StandardOutput.ReadToEnd(); p.WaitForExit(); Console.WriteLine(output); Thanks

    Read the article

  • Determining the health of a Cisco switch port?

    - by ewwhite
    I've been chasing a packet-loss and network stability issue for a handful of end-users on an internal network for the past few days... These issues surfaced recently, however, the location was struck by lightning six weeks ago. I was seeing 5-10% packet loss between a stack of four Cisco 2960's and several PC's and phones on the other side of a 77-meter run. The PC's were run inline with the phones over a trunked link. We were seeing dropped calls and interruptions in client-server applications and Microsoft Exchange connectivity. I tried the usual troubleshooting steps remotely, having a local technician do the following during breaks in user and production activity: change cables between the wall jack and device. change patch cables between the patch panel and switch port(s). try different switch ports within the 2960 stack. change end-user devices with known-good equipment (new phones, different PC's). clear switch port interface counters and monitor incrementing errors closely. (Pastebin output of sh int) Pored over the device logs and Observium RRD graphs. No link up/down issues from the switch side. change power strips on the end-user side. test cable runs from the Cisco 2960 using test cable-diagnostics tdr int Gi4/0/9 (clean)* test cable runs with a Tripp-Lite cable tester. (clean) run diagnostics on the switch stack members. (clean) In the end, it took three changes of switch ports to find a stable solution. The only logical conclusion is that a few Cisco 2960 switch ports are bad or flaky... Not dead, but not consistent in behavior either. I'm not used to seeing individual ports die in this manner. What else can I test or check to determine if these devices are bad? Is it common for single ports to have problems, rather than a contiguous bank of ports? BTW - show cable-diagnostics tdr int Gi4/0/14 is very cool... Interface Speed Local pair Pair length Remote pair Pair status --------- ----- ---------- ------------------ ----------- -------------------- Gi4/0/14 1000M Pair A 79 +/- 0 meters Pair B Normal Pair B 75 +/- 0 meters Pair A Normal Pair C 77 +/- 0 meters Pair D Normal Pair D 79 +/- 0 meters Pair C Normal

    Read the article

  • Is my Cisco switch port bad?

    - by ewwhite
    I've been chasing a packet-loss and network stability issue for a handful of end-users on an internal network for the past few days... These issues surfaced last week, however the location was struck by lightning six weeks ago. I was seeing 5-10% packet loss between a stack of four Cisco 2960's and several PC's and phones on the other side of a 77-meter run. The PC's were run inline with the phones over a trunked link (switchport configuration pastebin). We were seeing dropped calls and interruptions in client-server applications and Microsoft Exchange connectivity. I tried the usual troubleshooting steps remotely, having a local technician do the following during breaks in user and production activity: change cables between the wall jack and device. change patch cables between the patch panel and switch port(s). try different switch ports within the 2960 stack. change end-user devices with known-good equipment (new phones, different PC's). clear switch port interface counters and monitor incrementing errors closely. (Pastebin output of sh int) Pored over the device logs and Observium RRD graphs. No link up/down issues from the switch side. change power strips on the end-user side. test cable runs from the Cisco 2960 using test cable-diagnostics tdr int Gi4/0/9 (clean)* test cable runs with a Tripp-Lite cable tester. (clean) run diagnostics on the switch stack members. (clean) In the end, it took three changes of switch ports to find a stable solution. The only logical conclusion is that a few Cisco 2960 switch ports are bad or flaky... Not dead, but not consistent in behavior either. I'm not used to seeing individual ports die in this manner. What else can I test or check to determine if these devices are bad? Is it common for single ports to have problems, rather than a contiguous bank of ports? BTW - show cable-diagnostics tdr int Gi4/0/14 is very cool... Interface Speed Local pair Pair length Remote pair Pair status --------- ----- ---------- ------------------ ----------- -------------------- Gi4/0/14 1000M Pair A 79 +/- 0 meters Pair B Normal Pair B 75 +/- 0 meters Pair A Normal Pair C 77 +/- 0 meters Pair D Normal Pair D 79 +/- 0 meters Pair C Normal

    Read the article

  • Connect to bluetooth device from command line

    - by Ilari Kajaste
    Background: I'm using my bluetooth headset as audio output. I managed to get it working by the long list of instructions on BluetoothHeadset community documentation, and I have automated the process of activating the headset as default audio output into a script, thanks to another question. However, since I use the bluetooth headset with both my phone and computer (and the headset doesn't support two input connections) in order for the phone not to "steal" the connection when handset is turned on, I force the headset into a discovery mode when connecting to the computer (phone gets to connect to it automatically). So even though the headset is paired ok and would in "normal" scenario autoconnect, I have to always use the little bluetooth icon in the notification area to actually connect to my device (see screenshot). What I want to avoid: This GUI for connecting to a known and paired bluetooth device: What I want instead: I'd want to make the bluetooth do exactly what the clicking the connect item in the GUI does, only by using command line. I want to use command line so I can make a single keypress shortcut for the action, and would't need to navigate the GUI every time I want to establish a connection to the device. The question: How can I attempt to connect to a specific, known and paired bluetooth device from command line? Further question: How do I tell if the connection was successful or not?

    Read the article

  • Select (loop) or command not working in shell-script

    - by user208098
    I've been tinkering with Linux and Unix for years but still a novice in my mind and recently find myself trying to be more pro with it as I work in IT. So with that notion I'm studying shell scripting. I've hit a snag in ubuntu using the latest version 13.10 Saucy. When I use the select command in a sh script it doesn't work, depending on how I format the command it will either return Unexpected "do" or Unexpected "done". See the following two examples: This section of code produces an unexpected "do" error: #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit do case $opt in "option1") echo "you chose choice 1" ;; "option2") echo "you chose choice 2" ;; "option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done This section of code produces an unexpected "done" error. #/bin/bash PS3='Please enter your choice' select opt in option1 option2 option3 quit ; do case $opt in "Option1") echo "you chose choice 1" ;; "Option2") echo "you chose choice 2" ;; "Option3") echo "you chose choice 3" ;; "quit") break ;; *) echo invalid option ;; esac done When I enter these parameters into the command line interactively or manually I get the desired result which is a list of choices to choose from. However when executed from a script I get the before mentioned errors. Also a side note I have tried this in Fedora as a script and it worked perfectly so my question is why isn't it working in Ubuntu, is this a difference between RHL and Debian? Or is it a bug in the latest version of Ubuntu? Thanks in advance for any help! KG

    Read the article

  • How to run a command as administrator in Windows?

    - by tech
    I want to run a console program in Windows, but it required administrative privileges. So, I can right click the command prompt to run as administrator, but I want to use something from the command line to elevate the program. Is there something like sudo in Windows?

    Read the article

  • Problem connecting a 3Com 2952-Plus switch to a Cisco 3750 switch

    - by Noel
    Connected a 3Com 2952-SFP Plus switch to a Cisco 3750 switch via fibre. There is a light on the 3Com end, but nothing at the Cisco end, and no traffic will flow. Have swapped SFP's, have swapped fibre cables, have used a different port on the Cisco, have even swapped the 3Com switch, but still no joy. When I connect a 3Com 2948 switch over fibre that works OK. Any ideas?

    Read the article

  • Using ssh for remote command

    - by user1663479
    I need to use ssh to execute a remote command such as: ssh -l jsilva xman /vol/2011/linux_x64/exe/mx201111.exe When I execute ssh I receive error message: /cmg/2011.11/linux_x64/exe/mx201111.exe: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory This application uses the variable LD_LIBRARY_PATH. I inserted this variable into /etc/profiles in localhost and remote host. The filesystem /cmg is mounted by autofs for both hosts (local and remote). Anybody have idea how to resolve this problem? Thanks!

    Read the article

  • Accessibility bus warning when opening files in Eclipse from command line (Ubuntu 13.10)

    - by Reese
    Similar to closed issue Gnome Menu Broken? When opening a file from the command line for edits in Eclipse , I get this warning: ** (eclipse:nnnn): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. The 4-digit number at (eclipse:nnnn) changes each time I issue an 'eclipse some/file.ext' command. The file opens but the warning is an annoyance that shouldn't be happening, it may be indicative of some other problem. Updated Ubuntu 13.10 64-bit, updated Eclipse Luna.

    Read the article

  • Create USB installer from the command line?

    - by j-g-faustus
    I'm trying to create a bootable USB image to install Ubuntu on a new computer. I have done this before following the "create USB drive" instructions for Ubuntu desktop, but I don't have an Ubuntu desktop available. How can I do the same using only the command line? Things I've tried: Create bootable USB on Mac OS X following the ubuntu.com "create USB drive" instructions for Mac: Doesn't boot. usb-creator: According to apt-cache search usb-creator and Wikipedia usb-creator only exists as a graphical tool. "Create manually" instructions at help.ubuntu.com: None of the files and directories described (e.g. casper, filesystem.manifest, menu.lst) exist in the ISO image, and I don't know what has replaced them. unetbootin scripting: Requires X server (graphics support) to run, even when fully scripted. (The command sudo unetbootin lang=en method=diskimage isofile=~/ubuntu-10.10-server-amd64.iso installtype=USB targetdrive=/dev/sdg1 autoinstall=yes gives an error message unetbootin: cannot connect to X server.) Update Also tried GRUB fiddling: Merging information from pendrivelinux.com a related question on the Linux Stackexchange and a grub configuration example I was able to get halfway there - it booted from USB, displayed the grub menu and started the installation, but installation did not complete. For reference, this is the closest I got: sudo su # mount USB pen mount /dev/sd[X]1 /media/usb # install GRUB grub-install --force --no-floppy --root-directory=/media/usb /dev/sd[X] # copy ISO image to USB cp ~/ubuntu-10.10-server-amd64.iso /media/usb # mount ISO image, copy existing grub.cfg mount ~/ubuntu-10.10-server-amd64.iso /media/iso/ -o loop cp /media/iso/boot/grub/grub.cfg /media/usb/boot/grub/ I then edited /media/usb/boot/grub.cfg to add an .iso loopback, example grub entry: menuentry "Install Ubuntu Server" { set gfxpayload=keep loopback loop /ubuntu-10.10-server-amd64.iso linux (loop)/install/vmlinuz file=(loop)/preseed/ubuntu-server.seed iso-scan/filename=/ubuntu-10.10-server-amd64.iso quiet -- initrd (loop)/install/initrd.gz } When booting from USB, this would give me the Grub boot menu and start the installer, but the installer gave up after a couple of screens complaining that it couldn't find the CD-ROM drive. (Naturally, as the box I'm installing on doesn't have an optical drive.) I resolved this particular issue by giving up and doing the "create USB drive" routine using the Ubuntu Live desktop CD (on a computer that does have an optical drive), then the USB install works. But I expect that there is some way to do this from the command line of an Ubuntu system without X server and without an optical drive, so the question still stands. Does anyone know how?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >