The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
echo $0 mainegate Shell Programming and Scripting 2 09-24-2007 02:34 AM
echo debasis.mishra Shell Programming and Scripting 0 03-28-2006 01:35 AM
How to set echo on siegfried Shell Programming and Scripting 1 11-18-2005 01:56 AM
echo ????? nguda UNIX for Dummies Questions & Answers 1 06-30-2003 05:02 PM
echo help bb00y High Level Programming 5 10-02-2002 09:53 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-16-2008
sakthi.abdullah sakthi.abdullah is offline
Registered User
  
 

Join Date: Nov 2006
Posts: 22
echo ${PWD#${PWD%/*/*}/}

Can anyone explain this in detail ...

echo ${PWD#${PWD%/*/*}/}

[PWD is the present working directory]


Thanks in Advance
  #2 (permalink)  
Old 07-16-2008
Tytalus's Avatar
Tytalus Tytalus is offline Forum Advisor  
echo {1..9}^2\;|bc
  
 

Join Date: Jun 2003
Location: Scotland
Posts: 431
Have a look at:

Bash Reference Manual

and here,

Code:
echo ${PWD#${PWD%/*/*}/}

is 
echo ${PWD#X/}

where X = ${PWD%/*/*}

i.e it's a split in a split....
Closed Thread

Bookmarks

Tags
bash, echo, variable expansion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0