4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    page 1 / 1
    4 results tagged replace x
    • Note: terraform Interpolation-only expressions are deprecated

      :%s/("\${)//gc | %s/(}")//gc

      February 17, 2022 at 10:16:58 AM GMT+1 - permalink - archive.org - https://links.infomee.fr/?bnoJgw
      replace terraform
    • thumbnail
      python - How to search and replace text in a file? - Stack Overflow
      Sometime you cant use sed :(

      # Read in the file
      with open('file.txt', 'r') as file :
        filedata = file.read()

      # Replace the target string
      filedata = filedata.replace('ram', 'abcd')

      # Write the file out again
      with open('file.txt', 'w') as file:
        file.write(filedata)
      July 7, 2021 at 4:42:22 PM GMT+2 * - permalink - archive.org - https://stackoverflow.com/questions/17140886/how-to-search-and-replace-text-in-a-file
      python replace
    • Note: Replace literal \n with actual newline
      sed 's/\\n/\n/g' /tmp/t
      September 30, 2020 at 11:49:48 AM GMT+2 * - permalink - archive.org - https://links.infomee.fr/?cXcMlg
      backslash literal log logs n replace sed
    • thumbnail
      shell - bash / sh script to replace text between some tags/strings in a text file - Unix & Linux Stack Exchange

      Use

      sed '/#start/,/#end/replace_command'

      For example, if the file is called myconfig, and you want to replace "allow" with "deny" in that section, you could say

      sed '/#start/,/#end/s/allow/deny/' myconfig

      example

      sed -i -r "/<elasticConfig>/,/<\/elasticConfig>/s,<enabled>.+</enabled>,<enabled>false</enabled>," file.xml

      October 12, 2017 at 11:03:01 AM GMT+2 * - permalink - archive.org - https://unix.stackexchange.com/questions/272061/bash-sh-script-to-replace-text-between-some-tags-strings-in-a-text-file
      awk replace sed
    Links per page: 20 50 100
    page 1 / 1
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation