Remove empty lines

Uses a regular expressions to automatically get rid of new lines that don’t have any text in them.

Actions Used

shortcuts-action-icon-copy-to-clipboard.webp
Copy to Clipboard
Copies the result of the last action to the clipboard.
shortcuts-action-icon-replace-text.webp
Replace Text
Replaces some text passed into the action with other text.
shortcuts-action-icon-show-notification.webp
Show Notification
Displays a local notification.

Extra Details

Run Shortcut deep link
shortcuts://run-shortcut?name=Remove%20empty%20lines
Open Shortcut deep link
shortcuts://open-shortcut?name=Remove%20empty%20lines
AppleScript code
tell application “Shortcuts Events” run shortcut “Remove empty lines” end tell

More From This Folder

Spell check

Corrects the spelling of the text shared as input or from your clipboard, then presents it a prompt to confirm before copying.

Get Shortcut »

More From The Library

Watch The Morning Show

This Emmy winner is an unapologetically candid drama that looks at the modern workplace through the lens of the people who help wake America up. Pull back the curtain on early morning TV.

Get Shortcut »

Batch-add to Home Screen from folder

Asks you to choose a folder from Files or Finder containing your icons, then a folder from Shortcuts containing your shortcuts, then repeats through each adding a custom icon corresponding to the repeat index in the icon folder – icon-1.png for shortcut-1.shortcut (and so on).

Get Shortcut »


Get way deeper into Shortcuts – become a member.