Suppose I had a directory name of

where company was diff everytime.

How could I read the company part of the name in as one of the variables in my bash script?

Recommended Answers

All 3 Replies

is this what you want
read INUPT
the user enters
you want INPUT to equal just 'company'

no the directory is auto created by the control panel.

the directory would be ""

I need to be able to read the "company' part of the directory with no user input at all.

almost like a pwd that dissects the directory name.


I can be a little slow understanding stuff, is this what you mean

shane@mainbox shane $
shane@mainbox shane $ echo $input | sed "s/"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.