Search Results

Search found 43847 results on 1754 pages for 'command line arguments'.

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

  • using sed to replace 1 line with a multi-line variable in ksh

    - by Manda
    I have the following text in a file: XXXX NNNN YYYY NNNN ZZZZ NNNN I want to replace the NNNN to make it look like this: XXXX NNNN DUTY FORECASTER: YYYY NNNN DUTY FORECASTER: ZZZZ NNNN DUTY FORECASTER: How do I use sed to replace a variable with more than one line? Is there a better way of doing this without using sed? I have tried the following to no avail: sed 's/NNNN/"$value1"/g' testfile sed 's/NNNN/'"$value1"'/g' testfile sed 's/NNNN/${value1}/g' testfile sed 's/NNNN/'"${value1}"'/g' testfile I have also tried all of the above using double quotes. Any help is greatly appreciated. Thanks so much!

    Read the article

  • Starting airplay from command line, to send output of 'Say' Mac OS X command to airplay

    - by Fabien
    Ok, Sunday question :) Trying to make a little joke... 1) if you open a terminal, and type "say -a ?", Mac OS X will give you the list of devices it can send spoken words to. On mine, it says: 39 AirPlay 47 Built-in Output 2) I have a Denon airplay-ready received in my living room and I'm trying to send spoken words to my wife downstairs... I can send music without any problem using iTunes so, from an infrastructure standpoint, I'm all set. 3) I want my computer to say (out of the blue) "Honey, why don't you bring me a cup of coffee". I can make it say that locally on my internal laptop speakers, but I can't seem to send that to device 39 successfully. I am suspecting that there are a few other things that need to be setup before it works, i.e. setting up airplay output to "denon", maybe opening a channel and reserving it. I don't know. Has anyone played with this? Is there a way to setup airplay from the command line? That would be awesome :)

    Read the article

  • Add a Graphical User Interface (GUI) to the Microsoft Robocopy Command Line Tool

    - by Lori Kaufman
    Robocopy, or “Robust File Copy,” is a command line directory replication tool from Microsoft. It is available as part of Windows 7 and Vista as a standard feature, and was available as part of the Windows Server 2003 Resource Kit. NOTE: For Windows XP, you can obtain Robocopy by downloading the resource kit. Robocopy allows you to setup simple or advanced backup strategies. It provides such features as multi-threaded copying, mirroring or synchronization mode, automatic retry, and the ability to resume the copying process. If you are comfortable with using command line tools, you can run Robocopy directly on the command line using the command syntax and options. You can also download the command line reference and usage notes for Robocopy as a PDF file. If you are more comfortable using a graphical user interface, or GUI, rather than the command line, there are a couple of options for adding a GUI to the Robocopy command line tool, making it easier to use. Both tools, RoboMirror and RichCopy, are discussed below and links to download each tool are provided. How to Factory Reset Your Android Phone or Tablet When It Won’t Boot Our Geek Trivia App for Windows 8 is Now Available Everywhere How To Boot Your Android Phone or Tablet Into Safe Mode

    Read the article

  • How to run a command as admin in MSDos?

    - by tech
    I want to run a dos command in dos prompt, but this dos command is only executed using admin right. So, I can right click the command prompt to run as administrator, but I wanna to run one line of dos command using the admin right, can I run dos command in dos prompt like sudo in DOS cmd? thz u.

    Read the article

  • Importing PKCS#12 (.p12) files into Firefox From the Command Line

    - by user11165
    I’ve posted this question up on #Ubuntu and #Firefox Forums, and really could do with some help.. Anyone know where i could look or help with the answer. I’m hoping the power of social media will come through… I have a need to perform the following action: Firefox 3.6.x: Quote: open Edit - Preferences - Advanced - Encryption - View Certificates - Your Certificates - Import However i need the same functionality from the bash command line. So far I’ve established that the following command is supposed to be used: Quote: certutil -A -t “u,u,u” -d /home/df001/.mozilla/firefox/qe5y5lht.tc.default/ -n “mycert” -i client.p12 This executes with no isses, however, doesn’t show up in any Firefox Certificate store. However, I have noted that prior to running this command, i have a cert8.db key3.db and secmod.db file in the above folder. After running the command the certutil seems to have created a cert9.db, key4.db and pkcs12.txt file Listing the contents using the command: Quote: certutil -L -d sql:/home/df001/.mozilla/firefox/qe5y5lht.tc.default/ does seem to confirm my attempts of importing files into a certificate folder of some kind have worked. because i get Quote: Certificate Nickname Trust Attributes SSL,S/MIME,JAR/XPI Thawte SSL CA „ Go Daddy Secure Certification Authority „ Thawte SGC CA „ Entrust Certification Authority - L1C „ My Nero CT,C,c mynero P„ davidfield - Internet Widgits Pty Ltd u,u,u So, having tried this, and heading back over to the www, i cam across this command: Quote: pk12util -d /home/df001/.mozilla/firefox/qe5y5lht.tc.default/ -i client.p12 -n “David Field” -P “cert8.db” this again, appears to be importing something somewhere, however, again, Viewing certs from the Firefox interface doesn’t show the imported Cert. I’m surmising here on reading that the certutil and pk12util are creating a new NSS database, which firefox isn’t reading. So my question is, how can i get the p12 cert from the command line so it displays in the firefox Certificate manager interface? Why have i posted this here? Why not post on the firefox forum? Well i will copy and post the same question there as well, however the ability to use the command line to do this is important, as I have potentially 2000 machines which will need a user cert imported into firefox via a p12 file. I need to do this in the form of a script, i thought the hard part was going to be making the p12 file from the microsoft 2003 CA, turns out thats easy. I can’t just import via the GUI and copy over cert8.db x 2000, i can’t ask users to use the CA webinterface as its for VPN access, the users are off site, and they need the VPN to get to the cert server.. Is there any person out there who can help? By the way, i don't have the tor buttun installed.

    Read the article

  • Overwriting arguments object for a Javascript function

    - by Ian Storm Taylor
    If I have the following: // Clean input. $.each(arguments, function(index, value) { arguments[index] = value.replace(/[\W\s]+/g, '').toLowerCase(); }); Would that be a bad thing to do? I have no further use for the uncleaned arguments in the function, and it would be nice not to create a useless copy of arguments just to use them, but are there any negative effects to doing this? Ideally I would have done this, but I'm guessing this runs into problems since arguments isn't really an Array: arguments = $.map(arguments, function(value) { return value.replace(/[\W\s]+/g, '').toLowerCase(); }); Thanks for any input. EDIT: I've just realized that both of these are now inside their own functions, so the arguments object has changed. Any way to do this without creating an unnecessary variable?

    Read the article

  • split command on Ubuntu command-line

    - by pedro
    I want to split a file into multiple files with at most 25 lines each. I'm using this: split -l 25 /etc/adduser.conf > /home/ubuntu/PL/trab3/rc_ But I do not get the files I expect. How can I get files with filenames like rc_01, rc_02, etc.?

    Read the article

  • Running a program in background using command-line [duplicate]

    - by user291957
    This question already has an answer here: Running programs in the background from terminal 4 answers How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running which should not disturb the window i am working on? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window. The program should not disturb my window in which i am working on but it should be opened from the command line and i should be able to get access to it using the normal shortcut ALT+TAB. Even the command line should exit after running the command I tried this .... "gedit file-name & exit" this is working fine but the gedit file is opening in the foreground (let i be working on some application like mozilla. After running the command ..... gedit file is coming upwards and i have to flip to mozilla again but the command should just open the gedit file not shifting to gedit application from the mozilla window)

    Read the article

  • All command need privilage

    - by Am1rr3zA
    I try to install Hping3 in my ubuntu 8.04 but after installation when I want to Hping3 I got this error: Command 'hping3' is available in '/usr/sbin/hping3' The command could not be located because '/usr/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative priviledges associated with your user account. also when I try to run ifconfig I get this: Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative priviledges associated with your user account. first it needs to run sudo su and then run the command. is it normal? or I miss something? when I run echo $PATH I get: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/amirreza/simulator/ns-allinone-2.33/bin:/home/amirreza/simulator/ns-allinone-2.33/tcl8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/tk8.4.18/unix:/home/amirreza/simulator/ns-allinone-2.33/ns-2.33/:/home/amirreza/simulator/ns-allinone-2.33/nam-1.14/

    Read the article

  • Robust line of sight test on the inside of a polygon with tolerance

    - by David Gouveia
    Foreword This is a followup to this question and the main problem I'm trying to solve. My current solution is an hack which involves inflating the polygon, and doing most calculations on the inflated polygon instead. My goal is to remove this step completely, and correctly solve the problem with calculations only. Problem Given a concave polygon and treating all of its edges as if they were walls in a level, determine whether two points A and B are in line of sight of each other, while accounting for some degree of floating point errors. I'm currently basing my solution on a series of line-segment interection tests. In other words: If any of the end points are outside the polygon, they are not in line of sight. If both end points are inside the polygon, and the line segment from A to B crosses any of the edges from the polygon, then they are not in line of sight. If both end points are inside the polygon, and the line segment from A to B does not cross any of the edges from the polygon, then they are in line of sight. But the problem is dealing correctly with all the edge cases. In particular, it must be able to deal with all the situations depicted below, where red lines are examples that should be rejected, and green lines are examples that should be accepted. I probably missed a few other situations, such as when the line segment from A to B is colinear with an edge, but one of the end points is outside the polygon. One point of particular interest is the difference between 1 and 9. In both cases, both end points are vertices of the polygon, and there are no edges being intersected, but 1 should be rejected while 9 should be accepted. How to distinguish these two? I could check some middle point within the segment to see if it falls inside or not, but it's easy to come up with situations in which it would fail. Point 7 was also pretty tricky and I had to to treat it as a special case, which checks if two points are adjacent vertices of the polygon directly. But there are also other chances of line segments being col linear with the edges of the polygon, and I'm still not entirely sure how I should handle those cases. Is there any well known solution to this problem?

    Read the article

  • receiving "command not found" error messages after fresh reinstall of Lubuntu 14.04

    - by user236378
    Lubuntu 14.04 was working really great. . .until I messed up and had to do a complete fresh reinstall. Now I receive error messages when I input commands into the Terminal, even after immediately completing the fresh install. For example I type: sudo leafpad ?/etc/default/ or sudo leafpad ?/etc/default/grub I get: sudo: leafpad: command not found I type: sudo update-initramfs ?-u or sudo update-grub I get: sudo: update-initramfs: command not found or sudo: update-grub: command not found If I use the command mkdir I get: mkdir: command not found I also get this same exact error message, command not found, with sudo apt-get and wget In other words I can't do anything that I was able to do when inputting commands into the terminal. So I cannot add any repositories or update anything at all. I am not really sure what is causing the problem(s). It appeared to me that Lubuntu installed and booted up OK. However just as soon as I enter anything into the Terminal I immediately get the above error messages. I have tried to do the reinstall three times, same error messages. If anyone can suggest any fixes I would really appreciate it very much. Thank you!

    Read the article

  • Customized command line parsing in Python

    - by Moshe
    I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 [email protected] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' in front of the arguments. This behavior doesn't match my requirements. Any ideas how can this be solved? Any existing library for this?

    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

  • 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

  • Alternatives for 'egrep -o "success|error|fail" <filename> | sort | uniq -c'

    - by Wolfy
    I sometime need to check some logs and I do this with this command: egrep -o "success|error|fail" <filename> | sort | uniq -c Sample input: test error on line 10 test connect success test insert success test started at 00:00 test delete fail Sample output: 1 error 1 fail 2 success I would like to know if someone knows a way to do this with a shorter command? Before you ask why I would like to do this with an different command... No special reason, I'm just curious :)

    Read the article

  • How can I process command line arguments in Python?

    - by photographer
    What would be an easy expression to process command line arguments if I'm expecting anything like 001 or 999 (let's limit expectations to 001...999 range for this time), and few other arguments passed, and would like to ignore any unexpected? I understand if for example I need to find out if "debug" was passed among parameters it'll be something like that: if 'debug' in argv[1:]: print 'Will be running in debug mode.' How to find out if 009 or 575 was passed? All those are expected calls: python script.py python script.py 011 python script.py 256 debug python script.py 391 xls python script.py 999 debug pdf At this point I don't care about calls like that: python script.py 001 002 245 568 python script.py some unexpected argument python script.py 0001 python script.py 02 ...first one - because of more than one "numeric" argument; second - because of... well, unexpected arguments; third and fourth - because of non-3-digits arguments.

    Read the article

  • Connect to a network via the command line [closed]

    - by justasking
    I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line.

    Read the article

  • grep - what arguments do you usually specify?

    - by meder
    My most common grep line is just.. grep -IRl "text" * However I'm kinda getting tired of retyping this over and over - is there some way I can make an alias command so that those arguments are always enabled? And, I was wondering what arguments you usually specify for text searching - my two arguments 'R' for recursion, 'I' for not including binary types like jpg/gif, and 'l' for line number seem a bit too minimal. Which arguments do you use?

    Read the article

  • ifconfig : Command 'ifconfig' is available in '/sbin/ifconfig'

    - by Sahil Grover
    My question is related to another open question. My echo $PATH gives me an output which is like /home/sahil/.rvm/gems/ruby-1.9.3-p125/bin:/home/sahil/.rvm/gems/ruby-1.9.3-p125@global/bin:/home/sahil/.rvm/rubies/ruby-1.9.3-p125/bin:/home/sahil/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/home/sahil/.rvm/bin{}:/home/android-sdks/{}:/home/android-sdks/platform-tools/{}:/home/android-sdks/tools/{}:/home/sahil/android-sdks/tools{}:/home/sahil/android-sdks/tools:/home/sahil/android-sdks/platform-tools/ But running ifconfig gives me an output like Command 'ifconfig' is available in '/sbin/ifconfig' The command could not be located because '/sbin' is not included in the PATH environment variable. This is most likely caused by the lack of administrative privileges associated with your user account. ifconfig: command not found after running command like given in other question export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" it runs ifconfig but blocks other commands of ruby rails or rvm. Seeking help how to resolve this. Also why this happens?

    Read the article

  • Terminal line glitches

    - by foxy
    I installed Ubuntu 11.10 mini + LXDE and wanted to make my command line different in terminal (than just plain white), so I added blue color to path line (everything until $ sign) and it works fine but I have two strange glitches now: When i write a line which is longer than terminal window, instead of starting at next line it starts at the same one, overwriting everything which was in there. Sometimes while navigating over previous commands (up/down arrow keys) some part of command gets stuck and is treated as part of prompt (the blue text), but it is white and is non-deletable and is not taken as part of command when i press enter. What could I mess up? The bad thing is that I don't remember what exactly did I change, but i'm sure I changed only one line in bashrc

    Read the article

  • How to linebreak long string constructs ?

    - by iFloh
    I am editing SQLite SQL statements of substantial length. How can I break these into several lines to allow comfortablt editing? const char *sql = "SELECT arguments arguments arguments arguments arguments arguments arguments arguments arguments arguments FROM a, b, WHERE condition condition condition condition condition condition condition" into const char *sql = "SELECT arguments arguments arguments arguments arguments arguments arguments arguments arguments arguments FROM a, b WHERE condition condition condition" cheers

    Read the article

  • Newlines not being interpreted when passed to php via the command line

    - by CarbonX
    I have a PHP script that I'm invoking from another shell script that sends an automated email with a message generated from the shell script. Problem is, when I send the message all the newline characters are printed into the message. How do I get them to be interpreted? sendmail.sh: /path/to/phpscript/sendmail.php "Some Message With Newlines\nHello World.\n" sendmail.php: $message = $argv[1] . "\nNewline"; $smtp->send($to, $from, $message); The odd thing is the \n after the $argv variable is interpreted and actually prints Newline on a new line, but the newlines in the $argv variable don't, I have tried wrapping the variable in double quotes among other things but so far to no avail.

    Read the article

  • How do I get long command lines to wrap to the next line?

    - by BrianH
    Edit It was my .bashrc file. I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off. I'm now sticking with the standard bash variables for my $PS1. Thanks to @ændrük for the tip on the .bashrc! ...End Edit... Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed). It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet. What I type is this: echo abcdefghijklmnopqrstuvwxyz But what my terminal looks like before I hit the key is: pqrstuvwxyzghijklmno When I hit enter, it echos abcdefghijklmnopqrstuvwxyz so I know the command was received properly. It just wrapped my typing after the "o" and started over on the same line. What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this: echo abcdefghijklmno pqrstuvwxyz Background: I am using bash as my shell, and I have this line in my ~/.bashrc: set -o vi to be able to navigate the command line with VI commands. I am currently using Ubuntu 10.10 server, and connecting to the server with Putty. In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines. But for as long as I can remember using Ubuntu, my long commands only occupy 1 line. This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command. The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor. I don't think I have anything odd in my .bashrc file. I commented out the "set -o vi" line, and I still had the problem. I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes) Has anyone else had this problem, and can anyone think of how to fix it? Thanks in advance! Brian

    Read the article

  • How do I get long command lines to wrap to the next line?

    - by BrianH
    Edit It was my .bashrc file. I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off. I'm now sticking with the standard bash variables for my $PS1. Thanks to @ændrük for the tip on the .bashrc! ...End Edit... Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed). It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet. What I type is this: echo abcdefghijklmnopqrstuvwxyz But what my terminal looks like before I hit the key is: pqrstuvwxyzghijklmno When I hit enter, it echos abcdefghijklmnopqrstuvwxyz so I know the command was received properly. It just wrapped my typing after the "o" and started over on the same line. What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this: echo abcdefghijklmno pqrstuvwxyz Background: I am using bash as my shell, and I have this line in my ~/.bashrc: set -o vi to be able to navigate the command line with VI commands. I am currently using Ubuntu 10.10 server, and connecting to the server with Putty. In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines. But for as long as I can remember using Ubuntu, my long commands only occupy 1 line. This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command. The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor. I don't think I have anything odd in my .bashrc file. I commented out the "set -o vi" line, and I still had the problem. I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes) Has anyone else had this problem, and can anyone think of how to fix it? Thanks in advance! Brian

    Read the article

  • Connect to a network via Command Linke

    - by justasking
    Hi guys, I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line. Thanks!

    Read the article

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