Skip to main content
Elaborated the usage of storing result into a variable
Source Link
nitinr708
  • 1.4k
  • 2
  • 22
  • 29

Adding to ghostdog's answerTo store the transformed string into a variable.

  Following is what you have to do to change case of aworked for me - $SOURCE_NAME to $TARGET_NAME (upper to lower), inside another shell script:

TARGET_NAME="`echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'`"

Adding to ghostdog's answer.

  Following is what you have to do to change case of a $SOURCE_NAME to $TARGET_NAME (upper to lower), inside another shell script:

TARGET_NAME="`echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'`"

To store the transformed string into a variable. Following worked for me - $SOURCE_NAME to $TARGET_NAME

TARGET_NAME="`echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'`"
Post Undeleted by nitinr708
Post Deleted by nitinr708
format
Source Link
fedorqui
  • 285.3k
  • 105
  • 579
  • 617

Hi addingAdding to ghostdog's answer.

Following is what you have to do to change case of a $SOURCE_NAME$SOURCE_NAME to $TARGET_NAME$TARGET_NAME (upper to lower), inside another shell script..:

TARGET_NAME="echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'"

TARGET_NAME="`echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'`"

Hi adding to ghostdog's answer

Following is what you have to do to change case of a $SOURCE_NAME to $TARGET_NAME (upper to lower), inside another shell script..

TARGET_NAME="echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'"

Adding to ghostdog's answer.

Following is what you have to do to change case of a $SOURCE_NAME to $TARGET_NAME (upper to lower), inside another shell script:

TARGET_NAME="`echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'`"
Source Link
nitinr708
  • 1.4k
  • 2
  • 22
  • 29

Hi adding to ghostdog's answer

Following is what you have to do to change case of a $SOURCE_NAME to $TARGET_NAME (upper to lower), inside another shell script..

TARGET_NAME="echo $SOURCE_NAME | tr '[:upper:]' '[:lower:]'"