Sunday, 8 Feb 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  Key considerations for your modular data centre procurement
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

WhatsApp for iOS is rolling out passwordless logins with passkeys

Yet one more app joins the passwordless future we’ve been promised. WhatsApp says it’s now…

April 25, 2024

Happy New Year from the HostingJournalist Team!

Collectively, we explored groundbreaking developments in AI-driven server, networking and knowledge middle operations, subsequent to…

January 1, 2025

Aligned and Lambda launch liquid-cooled AI data center in Dallas

Aligned Knowledge Facilities, a supplier of information middle options, and Lambda have partnered to launch…

May 15, 2025

Dell Technologies Unveils AI, Multicloud, and Edge Innovations

Dell Applied sciences is right here to show your boldest concepts into actuality utilizing AI,…

June 8, 2024

Kenya Secures Funding for Major Data Center Infrastructure Project | DCN

(The Star, Kenya) -- The Kenyan government has secured a $4.48 billion (Sh682,496,192,000 billion) deal…

January 26, 2024

You Might Also Like

System administrator typing supercomputer hub disaster recovery plan on laptop to provide fast restoration of service, limiting damage and minimizing interruptions to normal operations
Global Market

8 hot networking trends for 2026

By saad
Shutterstock Germany Only - News - Intel Factory Germany September 2024
Global Market

Intel sets sights on data center GPUs amid AI-driven infrastructure shifts

By saad
Side view of technician or engineer with headset and laptop standing in industrial factory.
Global Market

Is private 5G/6G important after all?

By saad
Levi’s Stadium hosts Super Bowl LX
Global Market

Super Bowl LX raises network expectations

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.