Results 1 to 2 of 2

Thread: string commands together?

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    6
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default string commands together?

    anyone know how/if i can do this with one command instead of 3?

    mkdir lowercase UPPERCASE

    find -regex [a-z] -exec cp lowercase
    find -regex [A-Z] -exec cp UPPERCASE

  2. #2
    Member thegod_slayer's Avatar
    Join Date
    Aug 2010
    Location
    west bengal
    Posts
    40
    Thanks
    6
    Thanked 6 Times in 6 Posts
    Rep Power
    0

    Default

    the best way to solve your problem is to write a script.
    write a bash script including these commands.
    give that script executable permission and then move it to /bin directory.
    check whether the script is executing or not by the ./scriptname
    then reboot and wola!!!! you have created a new command.
    now no need for the ./scriptname, you can just type the name in the command line and it will work as any command like ls or cp or clear, etc.

  3. The Following User Says Thank You to thegod_slayer For This Useful Post:

    mynights (29th March 2011)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Solved] split String with /bin/sh?
    By pacghost in forum Shell scripting
    Replies: 5
    Last Post: 6th May 2010, 01:18 AM
  2. [Solved] Howto get the string between two patterns
    By devi_vi in forum Shell scripting
    Replies: 2
    Last Post: 4th March 2010, 11:04 PM
  3. [Solved] Delimiting a string in bash to run shell commands and pipes
    By iaroot in forum Shell scripting
    Replies: 2
    Last Post: 23rd January 2010, 02:01 AM
  4. String manipulation
    By Gideon in forum Shell scripting
    Replies: 19
    Last Post: 31st May 2009, 02:50 AM
  5. example for string connect to a command.
    By ryan in forum Shell scripting
    Replies: 2
    Last Post: 22nd February 2005, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •