How to use wildcards with ls without listing directory contents?
803
ls -d
suppresses listing the contents of directories listed on the command line (via the wildcard). From the documentation:
-d Directories are listed as plain files (not searched recursively).
Author by
Bogdan Bogdanov
Updated on September 18, 2022Comments
-
Bogdan Bogdanov over 1 year
This is my code:
UIGraphicsBeginImageContextWithOptions(CGSizeMake(self.view.frame.width,graphSize), false, 0) let context = UIGraphicsGetCurrentContext() CGContextSetStrokeColorWithColor(context, UIColor.whiteColor().CGColor) CGContextSetLineWidth(context, 0.3) CGContextBeginPath(context) CGContextMoveToPoint(context, width1, height1) CGContextAddLineToPoint(context, width11, height11) CGContextMoveToPoint(context, width2, height2) CGContextAddLineToPoint(context, width22, height22) //dash line CGContextStrokePath(context) CGContextMoveToPoint(context, width3, height3) CGContextAddLineToPoint(context, width33, height33) CGContextSetLineDash(context, 0, [4], 1) //next lines... CGContextMoveToPoint(context, width4, height4) CGContextAddLineToPoint(context, width44, height44)
I want to have dashes on width3 and height3, but my next lines are also dashed.. How to stop the dash line to be executed ?
-
Vasil Garov almost 9 yearsYou can try to reset it like this:
CGContextSetLineDash(context, 0, NULL, 0)
-
-
aless80 almost 7 yearsls -d * does what you say but unfortunately ls -d does not list directories.