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

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 »

Change text case

Takes the input from the Share sheet or clipboard, lets you choose from UPPERCASE, lowercase, Capitalizing Every Word, swapping to Title Case, or swapping to Sentence case, and copies it to your clipboard.

Get Shortcut »

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

Encode audio

Records audio until you tap it to stop, then encodes it into a text-based format, then copies it to your clipboard (to be decoded and played back later).

Get Shortcut »

Show apps connected to Gemini

“Bring it all together with Gemini and your favorite apps. Go from tons of tabs to one conversation. Gemini can now access info from new sources, starting with Maps, YouTube, Flights, and Hotels so you can bring your ideas to life easier and faster.”

Get Shortcut »

Log caffeine

Asks you to choose the type of caffeinated drink (coffee, espresso, cappuccino, or a soda) and logs the caffeine content into the Health app. Also compares against the daily recommended limit of milligrams of caffeine.

Get Shortcut »


Get way deeper into Shortcuts – become a member.

Browse more