Saturday, 11 Apr 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  Linux filesystems: Ext4, Btrfs, XFS, ZFS and more
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

The quiet work behind Citi’s 4,000-person internal AI rollout

For a lot of giant corporations, synthetic intelligence nonetheless lives in facet initiatives. Small groups…

January 21, 2026

Sydecar Raises $11M in Series A Funding

Sydecar, a San Francisco, CA-based supplier of a deal execution platform, raised $11M in Collection…

January 14, 2025

OpenAI: Extending model ‘thinking time’ helps combat emerging cyber vulnerabilities

Be a part of our every day and weekly newsletters for the newest updates and…

January 26, 2025

Data4 Plans €1 Billion Italian Investments Including Data Center | DCN

(Bloomberg) -- Knowledge middle operator Data4 plans to create a brand new campus in Milan…

April 29, 2024

PEXX Announces Strategic Acquisition of Chain Debrief

Singapore, Singapore, August twentieth, 2024, Chainwire PEXX, an progressive fintech startup specialising in stablecoin cross-border…

August 20, 2024

You Might Also Like

Why sovereignty now shapes data centre planning in Europe
Global Market

Why sovereignty now shapes data centre planning in Europe

By saad
Heat emission from the chimneys of a large data and server complex.
Global Market

OpenAI puts part of Stargate project on hold over runaway power costs

By saad
EMEA data centre vacancy hits record low as AI demand outpaces supply
Global Market

EMEA data centre vacancy hits record low as AI demand outpaces supply

By saad
Germany only - Google erweitert Gemini-Portfolio mit kosteneffizienten Modellen
Global Market

Google owns the most AI compute, and it built it its way

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.