Sunday, 22 Mar 2026
Subscribe
logo
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Font ResizerAa
Data Center NewsData Center News
Search
  • Global
  • AI
  • Cloud Computing
  • Edge Computing
  • Security
  • Investment
  • Sustainability
  • More
    • Colocation
    • Quantum Computing
    • Regulation & Policy
    • Infrastructure
    • Power & Cooling
    • Design
    • Innovations
    • Blog
Have an existing account? Sign In
Follow US
© 2022 Foxiz News Network. Ruby Design Company. All Rights Reserved.
Data Center News > Blog > Global Market > Converting between uppercase and lowercase on the Linux command line
Global Market

Converting between uppercase and lowercase on the Linux command line

Last updated: June 8, 2024 2:31 pm
Published June 8, 2024
Share
Letters, type, code
SHARE

Contents
Utilizing awkUtilizing sedManipulating textual content in a file

Utilizing awk

The awk command helps you to do the identical factor with its toupper and tolower choices. The command within the script proven within the earlier instance could possibly be finished this fashion as an alternative:

echo $dept | awk '{print toupper($0)}' >> depts

The reverse (switching to lowercase) would appear like this:

echo $dept | awk '{print tolower($0)}' >> depts

Utilizing sed

The sed (stream editor) command additionally does a terrific job of switching between upper- and lowercase. This command would have the identical impact as the primary of the 2 proven above.

echo $dept | sed 's/[a-z]/U&/g' >> depts

Switching from uppercase to lowercase would merely contain changing the U close to the top of the road with an L.

echo $dept | sed 's/[A-Z]/L&/g' >> depts

Manipulating textual content in a file

Each awk and sed additionally let you change the case of textual content for whole recordsdata. So, you simply discovered your boss wished these division names in all lowercase? No downside. Simply run a command like this with the file title offered:

$ awk '{print tolower($0)}' depts
finance
billing
bookkeeping

If you wish to overwrite the depts file, as an alternative of simply displaying its contents in lowercase, you would wish to do one thing like this:

Source link

See also  ZuriQ Secures $4.2M to Tackle Quantum Computing’s Scalability Challenge
TAGGED: command, converting, Line, Linux, lowercase, uppercase
Share This Article
Twitter Email Copy Link Print
Previous Article Hugging Face and Pollen Robotics open source robot does chores Hugging Face and Pollen Robotics open source robot does chores
Next Article Sware Sware Raises $6M in Series B Funding
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Your Trusted Source for Accurate and Timely Updates!

Our commitment to accuracy, impartiality, and delivering breaking news as it happens has earned us the trust of a vast audience. Stay ahead with real-time updates on the latest events, trends.
FacebookLike
TwitterFollow
InstagramFollow
YoutubeSubscribe
LinkedInFollow
MediumFollow
- Advertisement -
Ad image

Popular Posts

Planning for the Data Centers of the Future

The warmth is on for information middle operators standing up AI-era amenities. Energy-hungry next-gen applied…

July 25, 2025

Price Tag for Amazon’s Mississippi Data Centers Jump 60% to $16B

(Bloomberg) -- Amazon is anticipated to spend 60% greater than beforehand introduced on a large…

January 31, 2025

Poolside upsizes and extends AI Cloud Services contract

SYDNEY, Australia, April 08, 2024 (GLOBE NEWSWIRE) -- IREN (Iris Power Restricted) (NASDAQ: IREN) (along…

April 8, 2024

Top 10 Data Center Sustainability Stories of 2024

In some methods, the sustainability developments that formed the info heart trade in 2024 have…

December 18, 2024

Corsha Receives Investment from Cybernetix Ventures

Corsha, a Vienna, VA-based supplier of a machine id supplier (mIDP) purpose-built to safe machine-to-machine…

August 2, 2025

You Might Also Like

Nvidia space data center
Global Market

Nvidia joins push for data centers in space

By saad
The European Commission headquarters in Brussels (8)
Global Market

Beware hyperscalers’ ‘sovereignty washing,’ Euro cloud operators tell EU

By saad
Schneider Electric, NVIDIA and AVEVA unveil AI data centre design tools
Global Market

Schneider Electric, NVIDIA and AVEVA unveil AI data centre design tools

By saad
data center men servers cloud
Global Market

IDC: Dell leads server market driven by AI infrastructure needs

By saad
Data Center News
Facebook Twitter Youtube Instagram Linkedin

About US

Data Center News: Stay informed on the pulse of data centers. Latest updates, tech trends, and industry insights—all in one place. Elevate your data infrastructure knowledge.

Top Categories
  • Global Market
  • Infrastructure
  • Innovations
  • Investments
Usefull Links
  • Home
  • Contact
  • Privacy Policy
  • Terms & Conditions

© 2024 – datacenternews.tech – All rights reserved

Welcome Back!

Sign in to your account

Lost your password?
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
You can revoke your consent any time using the Revoke consent button.