problem about cut-Collection of common programming errors
jordanm
linux bash find cut
I have the following script called oftencleanup.sh#!/bin/bash DEFAULT_LIMIT=10 INPUT=$1 PATTERN=$2 LIMIT=$3if [ “$INPUT” == “” ] || [ “$PATTERN” == “” ] thenecho “usage: $0 INPUT PATTERN [LIMIT]”exit 1; fi if [ “$LIMIT” == “” ] thenLIMIT=$DEFAULT_LIMIT fifind /var/project/project1 -maxdepth 1 -type d -name “${INPUT}-${PATTERN}*” -printf ‘%T@ %p\n’|sort -nr|tail -n+$LIMIT|cut -f 2- -d ” “|xargs -i rm -rf {}So this one is supposed to remove the last but $LIMIT directories with prefix $INPUT-$PATTE
Kit Sunde
command-line cut
I have a file cities like this:[1598] San Diego, US (inactive) [4517] St Louis, US (inactive) [6346] Orlando, US (inactive)I want to cut out the city names, so that I have:San Diego St Louis OrlandoThis is the best I could come up with:cut -d ‘,’ -f1 cities | cut -d ‘]’ -f2But that still leaves me with a space before the names. Is there a cut like command that I can use that accept delimiters of several characters so I can cut on ]?
user732274
objective-c osx paste cut
I’d like to disable cut and/or paste in the menubar at runtime, in my ObjC app. I know that that’s possible in iOS using -(BOOL)canPerformAction:(SEL)aSelector withSender:(id)senderIs there anything similar for MacOS?Thank you
Dave Newman
apple final cut compressor
I got this error and any clues will be appreciated.Thanks Process: Compressor [535] Path: /Applications/Compressor.app/Contents/MacOS/Compressor Identifier: com.apple.compressor.Compressor Version: ??? (???) Build Info: Compressor-1440000~2 Code Type: PPC (Native) Parent Process: launchd [106]Interval Since Last Report: 1350 sec Crashes Since Last Report: 2 Per-App Interval Since Last Report: 0 sec Per-App Crashes Since Last Report:
ptheofan
javascript jquery keyboard-shortcuts cut
I have trapped the cut event (jquery) on a textbox. What I want is to get the text on the textbox during the cut event is triggered.I’ve tried accessing the data the user cut via evt.originalEvent.clipboardData.getData(‘text’) but returns undefined.My goal is to know if the user cut all the text (textbox is now empty) or not.Thanks in advance
Web site is in building