Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Need help reading ksh script

Can someone tell me what does this line do?

cut -d"/" -f1-4`

I understand that it grabs the string, ignored the forward slash character and cus characters 1 throught 4 from the string. Am I correct?

Also what is the difference when cut command is called with -c1-4 as opposed to -f1-4?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

but what does it do to the / character?
It uses it as a field delimiter to determine what the first 4 fields are
Avatar of YZlat

ASKER

But what about the difference bewteen -f1-4 and -c1-4?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial