Sunday, 1 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  Linux Foundation Spearheads Global Effort to Advance Corporate AI Systems
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

OpenAI counter-sues Elon Musk for attempts to ‘take down’ AI rival

OpenAI has launched a authorized counteroffensive in opposition to considered one of its co-founders, Elon…

April 10, 2025

Data centre industry faces dire skills shortage

The initiative is an important a part of HireHigher's mission to enhance careers recommendation in…

May 24, 2025

3DOS Expands Decentralized Manufacturing with Walrus-Powered AI & Storage

Palo Alto, USA, February eleventh, 2025, Chainwire 3DOS, the world’s first decentralized manufacturing community, has…

February 11, 2025

Three Ways to Tackle a Looming Crisis

Within the race for aggressive benefit, there may be an obsession with technological innovation. Whereas…

June 13, 2024

Azora and Core Capital Launch Edge Data Center Company Focused on Spain and Portugal

Investment manager Azora, in collaboration with Core Capital, has announced the launch of the Quetta…

February 11, 2024

You Might Also Like

Close-up cropped view portrait of his he nice attractive skilled professional smart focused guy monitoring client
Global Market

New Relic connects observability platform to business outcomes

By saad
Data center / enterprise networking
Global Market

HPE’s latest Juniper routers target large‑scale AI fabrics

By saad
Panoramic high speed technology in big city concept, light abstract background.
Global Market

Netskope targets AI-driven network bottlenecks with AI Fast Path

By saad
H1 2026 - Data Centre Review
Global Market

H1 2026 – Data Centre Review

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.