Thread: Command Line Arguments Passing String and Comparing strings

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2021
    Posts
    2

    Command Line Arguments Passing String and Comparing strings

    i want to compile a c program to run it in my command line.

    but i am unable to do this i am facing many errors. main thing i want to do is running this command in linux like :
    Code:
    mycommand yum upgrade
    here mycommand is a C compiled file and yum upgrade are arguments. if it's detected argument yum then it will check next argument which is upgrade then it will execute a linux command yum update anybody can do this for me ?
    Last edited by monsterlegend; 02-05-2021 at 10:35 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Command line arguments and passing them
    By somebody in forum C Programming
    Replies: 13
    Last Post: 04-07-2012, 10:33 AM
  2. C ...String replacement... command line arguments
    By andrew1400 in forum C Programming
    Replies: 11
    Last Post: 04-18-2010, 10:42 PM
  3. passing arguments using "Command Line Arguments"
    By Madshan in forum C++ Programming
    Replies: 1
    Last Post: 04-19-2006, 03:46 PM
  4. Comparing command line arguements to a string.
    By SlyMaelstrom in forum C++ Programming
    Replies: 14
    Last Post: 10-30-2005, 04:56 AM
  5. String Search with command line arguments
    By goron350 in forum C Programming
    Replies: 5
    Last Post: 11-29-2004, 05:56 PM

Tags for this Thread