Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Bash – Trim/Remove White Space

Posted on May 4, 2017August 25, 2019 By David Kittell
sed 's/^[ \t]*//'
sed 's/[ \t]*$//'
sed 's/^[ \t]*//;s/[ \t]*$//'
Originally Posted on May 4, 2017
Last Updated on August 25, 2019
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

CentOS Code Fedora Mac OS X Shell Mac OSX Raspberry Pi Red Hat Ubuntu UNIX UNIX Shell Scripts sedspacetabtrim white spacewhite spacewhitespace

Post navigation

Previous post
Next post

Related Posts

Send Authenticated Email – Console Application

Posted on March 19, 2015October 26, 2015

Depending on your needs I would put the email settings in an app.config file rather than in the exe but for testing this will do what it needs to. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; #region Send Authenticated Email – Using List using System.Net.Mail; #endregion Send…

Read More

Import Excel Spreadsheet into DataGrid

Posted on March 25, 2013October 26, 2015

Originally found at http://blueraiden.exofire.net/blog/import-excel-spreadsheet-data-to-datagridview-using-vb-net For the code to work you need to first add a DataGridView and a Button in design view and have a valid file path for the Excel file. Imports System.Data.SqlClient Public Class Form1 Dim MyConnection As System.Data.OleDb.OleDbConnection Dim ExcelDataSet As System.Data.DataSet Dim ExcelAdapter As System.Data.OleDb.OleDbDataAdapter Private…

Read More

Hide/Unhide Element Via ID

Posted on June 12, 2013October 26, 2015

In this code it is important to have visibility = ‘hidden’ and display = ‘none’ to hide without leaving white space function off(i) { document.getElementById(i).style.visibility = ‘hidden’; document.getElementById(i).style.display = ‘none’; } In this code it is important to have visibility = ” and display = ” to show function on(i)…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes