Monday, 12 Jan 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  Aalberts integrated piping systems highlights “Apollo”® Press® product line for the data center industry
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

Surge in threat actors scanning Juniper, Cisco, and Palo Alto Networks devices

A surge in web probes focusing on gadgets from Juniper Networks, Cisco Techniques, and Palo…

April 5, 2025

Colocation Edge Data Centers: Tracking the Market Growth

As know-how progresses and functions develop in complexity, a brand new improvement is on the…

July 15, 2024

TIA Aims To Solve Data Center Standardization Problem

The information middle trade is grappling with a urgent dilemma: find out how to keep…

November 5, 2025

UK hospitals begin live trial of prostate cancer-detecting AI

Three hospital methods throughout England have begun a dwell medical trial of AI know-how designed…

July 23, 2024

AWS Significantly Expands Cloud Data Centers in Hyderabad, India

Amazon Internet Providers (AWS) is making important strides in increasing its cloud infrastructure footprint in…

August 13, 2024

You Might Also Like

AMD logo on office
Global Market

AMD launches on-prem AI chip, previews higher-end systems at CES

By saad
Engineer
Global Market

AI, edge, and security: Shaping the need for modern infrastructure management

By saad
AWS logo on wall
Global Market

AWS hikes prices for EC2 Capacity Blocks amid soaring GPU demand

By saad
Portrait of Two Diverse Developers Working on Computers, Typing Lines of Code that Appear on Big Screens Surrounding Them. Male and Female Programmers Creating Innovative Software, Fixing Bugs.
Global Market

At CES, Nvidia launches Vera Rubin platform for AI data centers

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.