Unix/Linux Go Back    


Programming Post questions about C, C++, Java, SQL, and other programming languages here.

Basename for directory variable

Programming


Tags
solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 12-07-2016
robertkwild robertkwild is offline
Registered User
 
Join Date: Apr 2016
Last Activity: 14 December 2016, 4:35 AM EST
Posts: 43
Thanks: 4
Thanked 3 Times in 2 Posts
Yes, that's worked, I moved it under my -


Code:
read -e dir

I'm using the command I was before


Code:
base=$(basename $dir)

Thanks Robin


Moderator's Comments:
Basename for directory variable Please use CODE tags as required by forum rules!

Last edited by RudiC; 12-07-2016 at 02:00 PM.. Reason: Added CODE tags.
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
$(basename $0) abhi200389 Shell Programming and Scripting 1 12-25-2012 02:26 AM
basename venkatesht UNIX for Dummies Questions & Answers 2 03-31-2010 07:27 AM
basename $0 kripssmart Shell Programming and Scripting 4 05-12-2009 06:13 AM
Sed variable substitution when variable constructed of a directory path alrinno Shell Programming and Scripting 2 07-11-2008 03:24 PM
Setting basename and dirname variable to simply script. liketheshell Shell Programming and Scripting 1 09-12-2007 02:36 PM



All times are GMT -4. The time now is 04:17 PM.