Search Results

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

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

  • Connect to a network via the command line

    - 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

  • Plone: Creating new Page fails "AttributeError: 'str' object has no attribute 'dates'"

    - by paskster
    I just installed Plone on my Centos 5.5. I was able login via the admin-account and create new users. But when I try to create a new page I get the following error message: Traceback (innermost last): Module ZPublisher.Publish, line 127, in publish Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module Products.CMFPlone.FactoryTool, line 446, in __call__ Module ZPublisher.mapply, line 77, in mapply Module ZPublisher.Publish, line 47, in call_object Module Products.CMFFormController.FSControllerPageTemplate, line 91, in __call__ Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call Module Shared.DC.Scripts.Bindings, line 324, in __call__ Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec Module Products.CMFCore.FSPageTemplate, line 240, in _exec Module Products.CMFCore.FSPageTemplate, line 180, in pt_render Module Products.PageTemplates.PageTemplate, line 80, in pt_render Module zope.pagetemplate.pagetemplate, line 113, in pt_render Warning: Macro expansion failed Warning: <type 'exceptions.KeyError'>: 'macro' Module zope.tal.talinterpreter, line 271, in __call__ Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 954, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 858, in do_defineMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 954, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 946, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 858, in do_defineMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 954, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 522, in do_optTag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 821, in do_loop_tal Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 852, in do_condition Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 946, in do_defineSlot Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 533, in do_optTag_tal Module zope.tal.talinterpreter, line 518, in do_optTag Module zope.tal.talinterpreter, line 513, in no_tag Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 888, in do_useMacro Module zope.tal.talinterpreter, line 343, in interpret Module zope.tal.talinterpreter, line 583, in do_setLocal_tal Module zope.tales.tales, line 696, in evaluate URL: file:/usr/local/Plone/buildout-cache/eggs/Plone-4.0.2-py2.6.egg/Products/CMFPlone/skins/plone_templates/calendar_macros.pt Line 12, Column 4 Expression: <PythonExpr date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years)> Names: {'container': <PloneSite at /reeple>, 'context': <ATDocument at /reeple/portal_factory/Document/document.2010-12-24.9331499294 used for /reeple>, 'default': <object object at 0x2ad1b9a18ae0>, 'here': <ATDocument at /reeple/portal_factory/Document/document.2010-12-24.9331499294 used for /reeple>, 'loop': {u'field': <Products.PageTemplates.Expressions.PathIterator object at 0x1bc9b9d0>, u'fieldset': <Products.PageTemplates.Expressions.PathIterator object at 0x1d396c90>}, 'nothing': None, 'options': {'args': (), 'state': <Products.CMFFormController.ControllerState.ControllerState object at 0x1ccdb2d0>}, 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x1d452ec0>, 'request': <HTTPRequest, URL=http://82.165.145.121:8081/reeple/portal_factory/Document/document.2010-12-24.9331499294/atct_edit>, 'root': <Application at >, 'template': <FSControllerPageTemplate at /reeple/atct_edit used for /reeple/portal_factory/Document/document.2010-12-24.9331499294>, 'traverse_subpath': [], 'user': <PloneUser 'pascalklein'>} Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__ __traceback_info__: date_components_support_view.result(inputvalue, 0, starting_year, ending_year, future_years) Module PythonExpr, line 1, in <expression> Module plone.app.form.widgets.datecomponents, line 50, in result AttributeError: 'str' object has no attribute 'dates' Any suggestions? CentOS 5.5 has the Python Version 2.4. So I'm not sure if that causes the issue.

    Read the article

  • How do I change the Creation/Mod Date of all folders on a USB drive using Touch command?

    - by Chad--24216
    I've got a USB drive with mp3 music on it that I play in my car. My car has a USB drive port. Problem is that the car sorts the music by Creation/Modification Date (and not alphabetically). This makes it a pain to find what artist I'm looking for. To solve this problem, I need a way to "update" the Creation/Modification Date for all folders on the USB drive every time I add a new folder of music to the USB drive. Anyone know how I can do this? The Touch command works great, but the format touch <filename> would take forever to do on each folder on the drive. Anyway to select all folders on the drive and then touch <all folders>? On my USB drive I have a folder for each album and the songs within each respective folder, like so: Album-1-folder Album-2-folder I need to apply the Touch command to each of the "album" folders on the drive. I stumbled upon a simple solution to solve this issue:touch /media/USB_Drive/*

    Read the article

  • Accidentally broke/remapped git command line command

    - by Kevin Teh
    I think I accidentally remapped my git command to automatically include the subcommand credential-osxkeychain on the command line while trying to install a git credential-helper. When I enter $git it now displays Usage: git credential-osxkeychain <get|store|erase> How can I fix it? Entering $alias returns alias rvm-restart='rvm_reload_flag=1 source '\''/Users/teh/.rvm/scripts/rvm'\''' Entering $which git returns /usr/bin/git I think the problem may have began when I entered a command to move git-credential-osxkeychain into /usr/bin/git instead of /usr/bin/

    Read the article

  • Using cd Command in Windows Command Line, Can't Navigate to D:\

    - by nicorellius
    This may be a stupid question, and I think I have looked elsewhere to find the answer... Might be a path issue, but when I open the command line and type from the C:\>: cd D:\ I cannot get to the D drive. Even if I type: cd D:\<folder name> The command.exe will auto-complete the line with the tab key, so it knows where I'm at. It just doesn't print to screen the result or actually get me there. This problem exists for the network drives as well. Now, if I use the chdir (cd) command like this: chdir D: or cd d: I get the print out of the D:\ below the command but it still says I'm in the C:\. I feel like I'm missing something simple.

    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

  • Nginx enable site command

    - by Ghassen Telmoudi
    We all know how to enable a website using apache on linux. I'm pretty sure that we all agree on using the a2ensite command. Unfortunately there is no default equivalent command comes with Nginx, but it did happens that I installed some package on ubuntu that allowed me to enable/disable sites and list them. The problem is I don't remember the name of this package. Anybody knows what I'm talking about? Please tell me name of this package and the command name.

    Read the article

  • In Windows Command Prompt, how to get the last command that started with some letters?

    - by NikoBellic
    Let's say I entered a bunch of commands one after another: rm blah.txt pwd ls cd .. cd blah pwd If I want to get "rm blah.txt" to appear again without typing the whole thing again, I can press up 6 times. But is there a faster way? Can filter my command history based on some text? Intuitively, I would like to just type in r and then press up to search through my command history for only commands that started with "r".

    Read the article

  • "TypeError: CreateText() takes exactly 8 arguments (5 given)" with default arguments

    - by Eli Nahon
    def CreateText(win, text, x, y, size, font, color, style): txtObject = Text(Point(x,y), text) if size==None: txtObject.setSize(12) else: txtObject.setSize(size) if font==None: txtObject.setFace("courier") else: txtObject.setFace(font) if color==None: txtObject.setTextColor("black") else: txtObject.setTextColor(color) if style==None: txtObject.setStyle("normal") else: txtObject.setStyle(style) return txtObject def FlashingIntro(win, numTimes): txtIntro = CreateText(win, "CELSIUS CONVERTER!", 5,5,28) for i in range(numTimes): txtIntro.draw(win) sleep(.5) txtIntro.undraw() sleep(.5) I'm trying to get the CreateText function to create a text object with my "default" values if the parameters are not used. (I've tried it with blank strings "" instead of None and no luck) I'm fairly new to Python and have little programming knowledge.

    Read the article

  • What is the best way to hide a command prompt window

    - by detj
    I'm running the headless interface of VirtualBox (VBoxHeadless.exe) with Ubuntu Server running on it. Every time I run VBoxHeadless, it starts a command prompt window which just sits on the taskbar taking space which could have been used by more useful programs. I want to hide this non-functional command prompt window (minimize to system tray or anything that just removes it visibly). How can I do this? It would be really cool, if this can be achieved without installing any 'minimize to system tray' utility. Any ideas??

    Read the article

  • How to broadcast a command on Windows

    - by Xiao Jia
    I am going to frequently deploy different versions of a program on a cluster of Windows machines (mostly Windows XP), so I am willing to use a command-line broadcasting tool (either built-in or 3rd-party) to (1) download a file from some URL, and (2) execute the same command, on all the machines. I googled for a very long time but got nothing related to my goal. (Only pages about broadcasting a message, broadcasting ping, or programmatically broadcast via TCP/IP, etc.) Are there any tool for this purpose? Or is it possible to do it pragmatically (without installing extra client programs on those machines)?

    Read the article

  • After each command tmux prints: ps1_update: command not found

    - by B.I.
    On Linux Ubuntu 11.04, after each command (cd, ls, vim...) successful or not, tmux prints out as a last line ps1_update: command not found. Is there any config option I am missing? Thank you very much! tmux.conf # http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily # just remember that after every modification, tmux must be refreshed # to take new settings into account. # This can be achieved either by restarting it or by typing in: # tmux source-file .tmux.conf # Here is a list of a few basic tmux commands: # Ctrl+b " - split pane horizontally. # Ctrl+b % - split pane vertically. # Ctrl+b arrow key - switch pane. # Hold Ctrl+b, don't release it and hold one of the arrow keys - resize pane. # !Ctrl+b c - (c)reate a new window. # !Ctrl+b n - move to the (n)ext window. # Ctrl+b p - move to the (p)revious window. # Shift+LMB - select text. # ALT+Arrows to move among panes. # rebind default prefix to C-a unbind C-b set -g prefix C-a # use ALT+Arrows to move around panes bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D # activity monitoring setw -g monitor-activity on set -g visual-activity on # highlight current pane set-window-option -g window-status-current-bg yellow # enable pane switching with mouse set-option -g mouse-select-pane on # read bashrc source ~/.bashrc # Sane scrolling set -g terminal-overrides 'xterm*:smcup@:rmcup@' commandline print out ($(cat)user@tiki:~/.vim$ ls autoload bash_profile bashrc bundle README.md tmux.conf vimrc xmonad xmonad-ubuntu-conf xsessionrc ps1_update: command not found ($(cat)user@tiki:~/.vim$ ll total 56 drwxrwxr-x 2 user user 4096 Mar 17 10:20 autoload/ -rw-rw-r-- 1 user user 170 Mar 17 10:20 bash_profile -rw-rw-r-- 1 user user 4004 Apr 2 11:37 bashrc drwxrwxr-x 20 user user 4096 Aug 20 10:55 bundle/ -rw-rw-r-- 1 user user 11170 Aug 20 11:24 README.md -rw-rw-r-- 1 user user 1243 Mar 17 10:20 tmux.conf ps1_update: command not found ($(cat)user@tiki:~/.vim$ And the following is plain terminal output, without tmux running user@tiki:~$ ls backup_list.md Documents Dropbox examples.desktop hakers_and_painters.md~ hyundai Music projects ror Ubuntu One Videos windows.sh Desktop Downloads elif.txt hakers_and_painters.md help.txt maqola.txt Pictures Public tmp update_background.sh VirtualBox VMs user@tiki:~$ ll total 116 -rw-rw-r-- 1 user user 380 Aug 9 17:34 backup_list.md drwxr-xr-x 6 user user 4096 Jul 15 09:26 Desktop/ drwxr-xr-x 2 user user 4096 Jul 7 11:26 Documents/ drwxr-xr-x 11 user user 20480 Aug 20 13:53 Downloads/ -rwx------ 1 user user 729 May 7 14:45 update_background.sh* drwxr-xr-x 2 user user 4096 Dec 10 2013 Videos/ drwxrwxr-x 4 user user 4096 Sep 10 2013 VirtualBox VMs/ -rwxrwxr-x 1 user user 36 Jan 11 2014 windows.sh* user@tiki:~$ cd Desktop/ user@tiki:~/Desktop$ ll total 36 -rw-rw-r-- 1 user user 3388 Jul 14 17:10 daily--report.md -rw-rw-r-- 1 user user 71 Jan 28 2014 fernandez readme.md -rw-rw-r-- 1 user user 23 Jan 28 2014 fernandez readme.md~ drwx------ 4 user user 4096 Mar 23 14:02 my_docs/ drwx------ 2 user user 4096 Feb 3 2014 Origami/ drwx------ 7 user user 4096 Feb 1 2013 Plants_vs._Zombies_v1.2.0.1065/ -rwxr-xr-x 1 user user 301 Apr 15 11:28 Sky Fight.desktop* drwx------ 2 user user 4096 Feb 11 2014 webdesign/ -rwxrwxr-x 1 user user 26 Jan 11 2014 windows.sh~* user@tiki:~/Desktop$

    Read the article

  • The executable is absent yet I can execute the command on the command line

    - by sharptooth
    There's such utility for Windows developers called regtlib. I have three computers - one with WinXP, another two with Win2k3. If I run built-in Windows search for file with wildcard regtlib* on the whole filesystem search finds nothing on all three computers. If I try to execute regtlib on WinXP command line it says it can't find such a file or built-in command. The same on one of the two Win2k3 computers. But when I do that on the other Win2k3 computer I see typical regtlib output. What happens? What is the magic that invokes regtlib without the file being present on the filesystem?

    Read the article

  • Can't use command line – "command not found" after editing PATH

    - by MEM
    I'm running OS X Mavericks and was trying to install MAMP PRO 2.2. I was trying to configure the PATH variable to have the PHP binaries of MAMP PRO. I added the following line on my ~/.bash_profile file: export PATH=/Applications/MAMP PRO/bin/php/php5.5.3/bin:$PATH As you may notice, since I have MAMP PRO and not just MAMP, I've added a space. As a consequence, I know have the following error each time I run the terminal: -bash: export: `PRO/bin/php/php5.5.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin': not a valid identifier Worst: I can't get any command to run, like: ls, clear etc. I always get: "command not found" I don't even know the absolute path for ls. How can I make the commands work again, so that I can properly fix the path I was trying to setup on the .bash_profile file?

    Read the article

  • What is the unit of size we get from using wmic command on windows

    - by Abhishek Simon
    I use a couple of wmic commands and I was wondering how can a user come to know the the unit of any size related command output? For Instance I use the below 2 commands wmic /node:Abhishek-PC cpu get maxclockspeed,l2cachesize,loadpercentage output: L2CacheSize LoadPercentage MaxClockSpeed 8192 1 1595 8192 1 1595 wmic /node:Abhishek-PC LogicalDisk Where DriveType="3" Get DeviceID,Size,FreeSpace output: DeviceID FreeSpace Size C: 13933780992 73300701184 E: 23688204288 73405558784

    Read the article

  • Alternative to the tee command whitout STDOUT

    - by aef
    I'm using | sudo tee FILENAME to be able to write or append to a file for which superuser permissions are required quite often. Although I understand why it is helpful in some situation, that tee also sends its input to STDOUT again, I never ever actually used that part of tee for anything useful. In most situations, this feature only causes my screen to be filled with unwanted jitter, if I don't go the extra step and manually silence it with tee 1> /dev/null. My question: Is there is a command arround, which does exactly the same thing as tee, but does by default not output anything to STDOUT?

    Read the article

  • Learn Linux Command Line for Web Server Management [closed]

    - by Jonathan
    I've searched high and low for a good resource for learning the Linux command line. I've found a handful of separate resources, but none that really can assist in web server management. I'm currently learning through trial an error with 'man' pages, along with Google. I was just wondering if anyone had a solid resource that they used to learn, and would be willing to share it with me. Thanks so much for your time, I really appreciate it! EDIT: I have a few CentOS servers at current, and I know the basics, I'm just trying to get to a more advanced level.

    Read the article

  • Passing arguments to commandline with directories having spaces

    - by superstar
    Hi guys, I am making a system call from perl for ContentCheck.pl and passing parameters with directories (having spaces). So I pass them in quotes, but they are not being picked up in the ContentCheck.pl file Random.pm my $call = "$perlExe $contentcheck -t $target_path -b $base_path -o $output_path -s $size_threshold"; print "\ncall: ".$call."\n"; system($call); Contentcheck.pl use vars qw($opt_t $opt_b $opt_o $opt_n $opt_s $opt_h); # initialize getopts('t:b:o:n:s:h') or do{ print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1}; if ($opt_h) {print $UsagePage; exit; } my $tar; if ($opt_t) {$tar=$opt_t; print "\ntarget ".$tar."\n";} else { print " in target"; print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1;} my $base; if ($opt_b) {$base=$opt_b;} else { print "\nin base\n"; print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1;} This is the output in the commandline call: D:\tools\PacketCreationTool/bin/perl/winx64/bin/perl.exe D:/tools/PacketCr eationTool/scripts/ContentCheck.pl -t "C:/Documents and Settings/pkkonath/Deskto p/saved/myMockName.TGZ" -b "input file/myMockName.TGZ" -o myMockName.validate -s 10 target C:/Documents in base *** Error: Invalid command line option. Use option -h for help. Any suggestions are welcome! Thanks.

    Read the article

  • C Minishell Command Expansion Printing Gibberish

    - by Optimus_Pwn
    I'm writing a unix minishell in C, and am at the point where I'm adding command expansion. What I mean by this is that I can nest commands in other commands, for example: $> echo hello $(echo world! ... $(echo and stuff)) hello world! ... and stuff I think I have it working mostly, however it isn't marking the end of the expanded string correctly, for example if I do: $> echo a $(echo b $(echo c)) a b c $> echo d $(echo e) d e c See it prints the c, even though I didn't ask it to. Here is my code: msh.c - http://pastebin.com/sd6DZYwB expand.c - http://pastebin.com/uLqvFGPw I have a more code, but there's a lot of it, and these are the parts that I'm having trouble with at the moment. I'll try to tell you the basic way I'm doing this. Main is in msh.c, here it gets a line of input from either the commandline or a shellfile, and then calls processline (char *line, int outFD, int waitFlag), where line is the line we just got, outFD is the file descriptor of the output file, and waitFlag tells us whether or not we should wait if we fork. When we call this from main we do it like this: processline (buffer, 1, 1); In processline, we allocate a new line: char expanded_line[EXPANDEDLEN]; We then call expand, in expand.c: expand(line, expanded_line, EXPANDEDLEN); In expand, we copy the characters literally from line to expanded_line until we find a $(, which then calls: static int expCmdOutput(char *orig, char *new, int *oldl_ind, int *newl_ind) orig is line, and new is expanded line. oldl_ind and newl_ind are the current positions in the line and expanded line, respectively. Then we pipe, and recursively call processline, passing it the nested command(for example, if we had "echo a $(echo b)", we would pass processline "echo b"). This is where I get confused, each time expand is called, is it allocating a new chunk of memory EXPANDEDLEN long? If so, this is bad because I'll run out of stack room really quickly(in the case of a hugely nested commandline input). In expand I insert a null character at the end of the expanded string, so why is it printing past it? If you guys need any more code, or explanations, just ask. Secondly, I put the code in pastebin because there's a ton of it, and in my experience people don't like it when I fill up several pages with code. 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

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