Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8878871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:49:02+00:00 2026-06-14T19:49:02+00:00

# The **variable slicing** notation in the following conditional # needs some explanation: `${var#expr}`

  • 0
  # The **variable slicing** notation in the following conditional
  # needs some explanation: `${var#expr}` returns everything after
  # the match for 'expr' in the variable value (if any), and
  # `${var%expr}` returns everything that doesn't match (in this
  # case, just the very first character. You can also do this in
  # Bash with `${var:0:1}`, and you could use cut too: `cut -c1`.

what does this actually means?
can i get an example

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:49:03+00:00Added an answer on June 14, 2026 at 7:49 pm

    Here’s an simple example:

    #!/bin/bash
    
    message="hello world!"
    var1="hello"
    var2="world!"
    echo "${message#$var1}"
    echo "${message%$var2}"
    echo "${message%???}"
    echo "${message}"
    

    Output:

     world!
    hello 
    hello wor
    hello world!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The variable filepath which is a string contains the value Música . I have
I have the following variable: pageID = 7 I'd like to increment this number
The variable strCSSClass often has a value but sometimes is empty. I do not
Variable scope in JS is confusing the hell out of me. In the following
My variable $var has the form 'abc.de'. What does this substr exactly do in
records variable contains following data [(38177492.733055562, 38177482.886388876), (39370533.190833323, 40563588.018611118), (34598340.198888883, 33405299.966944441), (40563586.926666655, 35791393.990277782), (35791394.635833345,
String variable stores value as like .. careteam order 4-26-11.csv i need to trim
I have the following code: $(function () { var target = $('span.slider') //can I
Variable : Stack<Entity> entityStack = new Stack<Entity>(); It has following values : sub_sub_sub1 sub_sub1
Will variable in function be destroyed after function run? class B { function C()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.