Skip to main content

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.

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. ...
Estatistics's user avatar
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 ...
glacier's user avatar
  • 489
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 ...
Pam's user avatar
  • 13
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"; ...
Nor.Z's user avatar
  • 133
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 ...
tarabyte's user avatar
  • 4,576
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 }}/...
Sollosa's user avatar
  • 2,009
-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 ...
Navid Taghavi's user avatar
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 ...
dAllARA's user avatar
  • 33
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 ...
Logan Kitchen's user avatar
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 ...
Rico Strydom's user avatar
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 ...
Shoopi's user avatar
  • 41
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 ...
rhuanpk's user avatar
  • 413
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&...
Bret Joseph's user avatar
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 ...
user2718593's user avatar
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 ...
DBO PHX's user avatar

15 30 50 per page
1
2 3 4 5
17