Remove empty lines

Remove empty lines

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

Scripting Actions

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

Extra Details

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

More From This Folder

Special characters

Contains a dictionary of names and symbols that, when passed into Choose From List, becomes selectable – for whichever option is chosen, the corresponding symbol will be passed out and copied to the clipboard.

Get Shortcut »

More From The Library

Open Threads app

Opens the Threads app from Instagram/Meta. On iPhone, works well with custom icons. On iPad, uses Stage Manager to make proper window. On Mac, opens web app created using Add to Dock.

Get Shortcut »

Show Today’s top stories

Opens the News app and switches to the Today tab, showing you Top Stories, Trending Stories, For You categories, magazines, the Editor’s pick, and curated categories based on your past browsing.

Get Shortcut »


Get way deeper into Shortcuts – become a member.

Browse more