Questions tagged [special-characters]
If it has a meaning beyond its literal meaning, a meta-meaning, then we refer to it as a special character.
                255 questions
            
            
            4
            votes
        
        
            1
            answer
        
        
            736
            views
        
    How can I remove special non-characters that are not part of national alphabets like faces from filenames, keeping any national alphabets intact?
                How can I remove special non-characters e.g. faces, avatars, emojis, symbols that are not part of national alphabets from filenames while keeping any national alphabets intact?
e.g. ...
            
        
       
    
            2
            votes
        
        
            2
            answers
        
        
            156
            views
        
    How does `*\ *` work in bash?
                There is an answer from SuperUser, which renames filenames containing whitespace:
for f in *\ *; do mv "$f" "${f// /_}"; done
The part I don't understand is *\ *.
The author wrote ...
            
        
       
    
            0
            votes
        
        
            1
            answer
        
        
            188
            views
        
    username with "/" gets truncated
                I am trying to SSH to Linux box with username containing /.
For example: tes/t
But the characters after / get truncated and user is seen as tes during SSH. SSH then fails with this user since its ...
            
        
       
    
            3
            votes
        
        
            2
            answers
        
        
            662
            views
        
    How do quotes work in bash regex regarding reserved characters?
                Is there any special bash reserved characters in bash regex expression?
ex:
eg: if [[ $url =~ ^https:\/\/www\.youtube\.com\/playlist\?(.+&)?list= ]]; then echo "URL matches the regex"; ...
            
        
       
    
            0
            votes
        
        
            2
            answers
        
        
            115
            views
        
    What does '-' as a file parameter mean? [duplicate]
                I'm having trouble finding a name for the - character in the context of a piped bash command.
What is the - character called?
Can I replace it with something more readable for a script?
Example ...
            
        
       
    
            1
            vote
        
        
            1
            answer
        
        
            588
            views
        
    using tabs within block for ansible blockinfile module
                I want to output some text with tab as separator using ansible
here's task snippet
- name: Create output file
  blockinfile:
    block: |
      Some text\tmore text
    path: '{{ playbook_dir }}/...
            
        
       
    
            -1
            votes
        
        
            2
            answers
        
        
            100
            views
        
    How to replace (***) with \(***\) with sed
                so I wanted to write a script to replace special characters with their escaped equivalent so I can pass it to mkdir command.
As a friend used a similar line I can use this to replace parantheses with ...
            
        
       
    
            0
            votes
        
        
            1
            answer
        
        
            78
            views
        
    value of $VAR already contains backtick and/or single quote inside. How to handle it? How to properly pass $VAR to program? [duplicate]
                $ bash --version
GNU bash, versione 5.2.26(1)-release (x86_64-pc-linux-gnu)
I don't know how to deal with $VAR when its value inside contains single quote (') and/or backtick (`).
I'm in the need of ...
            
        
       
    
            2
            votes
        
        
            1
            answer
        
        
            2k
            views
        
    Why is a filename surrounded by double quotes with single quotes around a character when displayed in terminal?
                Why would a file show up surrounded by double quotes with a character surrounded by single quotes within it?
"insight_automation.log'.'2024-03-13"
I am using Ubuntu Server 22.04.3 LTS. A ...
            
        
       
    
            1
            vote
        
        
            1
            answer
        
        
            100
            views
        
    cat vs. view and execution of file containing diacritics uploaded from Windows to Linux with WinSCP
                I have a DE_CopyOldToNew.sh file that was created in Windows. The file is then uploaded to Linux using WinSCP. The file contains a whole bunch of cp commands that copies files to a new folder with a ...
            
        
       
    
            3
            votes
        
        
            3
            answers
        
        
            1k
            views
        
    Use of special characters in filename
                I need to create a file named *'test'*
If I write touch \'test\'
ls shows 'test'
But if I write touch \*\'test\'\*
ls now shows *'\''test'\''*
What's the trick ? Can someone explain me what I did ...
            
        
       
    
            0
            votes
        
        
            0
            answers
        
        
            565
            views
        
    Strange/Buggy Characters in the Terminal
                I use Debian SID and the Terminator is my terminal emulator. After updating the system the last time (yesterday 2023/11/22) and rebooting, some characters in my terminal in certain commands are ...
            
        
       
    
            2
            votes
        
        
            1
            answer
        
        
            445
            views
        
    Escape special characters from variables [duplicate]
                I have
#!/usr/bin/bash
search="ldo_vrf18 {"
replace="$search"'                      compatible = "regulator-fixed";
                        regulator-name = "vrf18&...
            
        
       
    
            1
            vote
        
        
            2
            answers
        
        
            287
            views
        
    Recursive pattern search - output formating: for each match file print out the specific file name "\n", line number, sentence matched "\n" in colors
                I want a file content search command, under Linux so that:
it will search on specified files, e.g: md, txt, htm.
recursively from the folder and its subfolders, e.g: .
the content search can be ...
            
        
       
    
            0
            votes
        
        
            1
            answer
        
        
            617
            views
        
    Using the SED command with special characters
                Is there a way to use the sed command this to search for a  special character at the beginning of line, replace it with another special character, and append a special character to that line only?
I ...
            
        
       
     
         
         
         
         
         
        