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

      17 février 2022 à 10:16:58 UTC+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)
      7 juillet 2021 à 16:42:22 UTC+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
      30 septembre 2020 à 11:49:48 UTC+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

      12 octobre 2017 à 11:03:01 UTC+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