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.

Filter by
Sorted by
Tagged with
3 votes
2 answers
286 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
69 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,376
1 vote
1 answer
101 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
  • 1,951
-1 votes
2 answers
61 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
57 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
247 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
60 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
0 votes
0 answers
31 views

keyboard long press for special characters

Is there a way (in KDE) to get the long-press show special characters as in MacOS? I haven't used a Mac in nearly two years and I miss the feature when long pressing the "a" key, for ...
gtludwig's user avatar
  • 873
2 votes
3 answers
623 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
  • 31
0 votes
0 answers
244 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
  • 415
2 votes
1 answer
262 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
194 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
342 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
0 votes
2 answers
642 views

Entering special characters the same way on Windows and Linux

ctrlshiftu followed by the hex value of a Unicode character enters that character. For example, ctrlshiftu41 enters 'A', whose value is 0x41 in hex and 65 in decimal. There's also the compose key, ...
glibg10b's user avatar
  • 368
1 vote
0 answers
65 views

How do I type in special characters in Cinnamon with various apps?

I'm using Devuan GNU/Linux Daedalus, with Cinnamon 5.6.7 (Xorg server 21.1.7). I want to type in some characters not available on my keyboard, nor (to my knowledge) in my keyboard layout (English - ...
einpoklum's user avatar
  • 9,643
0 votes
2 answers
385 views

Regular Expression Bracket Expression with bash

I want to write a regular expression that only allows a user to enter an input which contains alphanumeric characters, underscores, periods, dashes, and plus signs. In a bash script, I have: VALID=&...
user3731622's user avatar
0 votes
1 answer
74 views

unterminated s command with seed on special characters with sed [duplicate]

i have special characters in the content of $VALUE which I would to add in file ($FILE). When I run this cammand : sed -i "s|T_VALUE|$VALUE|" "$FILE" i have an error unterminated ...
akaliza's user avatar
  • 101
0 votes
1 answer
224 views

Understanding bind mapping to switch between emacs and vi modes

tl;dr If I execute the following in bash, Ctrl+z seems to have no effect bind -m vi-command '"\C-z": emacs-editing-mode' bind -m vi-insert '"\C-z": emacs-editing-mode' bind -m ...
Enlico's user avatar
  • 1,677
3 votes
2 answers
691 views

Bash Parameter Expansion - Get Variables with a Prefix while Escaping Hyphen

EDIT: I realized I was mistaken about a central assumption in this post: The ${!prefix@} syntax isn't able to get function names, but only variables. Therefore, there is no way to get ${!prefix@} to ...
Q Z's user avatar
  • 133
1 vote
3 answers
350 views

Unable to enter first login password that has any accented vowel

After upgrading ubuntu to 22.04 I wasn't able to login because my password has any accented vowel, as for example "ú". This happens ONLY the FIRST login. In my case the new ubuntu 22.04 does ...
Norber's user avatar
  • 41
0 votes
3 answers
259 views

How to rename files recursively with a specific extension to remove unwanted characters in audio files

I want to rename files with a .m4a extension recursively in child directories to remove unwanted characters in audio files such as [ ' ]. That's because that this below happened to this file 04 Tears ...
Mohammed Mehdi TBER's user avatar
0 votes
1 answer
459 views

Bash, grep - why is a command with a caret not working in a subshell?

I'm trying to determine if a git add action has created any expected modifications, and the following works in an interactive shell $ BASE_DIR=foo/bar/baz $ git add "${BASE_DIR}" $ git ...
Bruno Kim's user avatar
  • 229
8 votes
1 answer
5k views

What are curly quotes and can I use them in my code?

Somehow curly quotes got into my code and I'm getting unexpected behavior #!/bin/sh if [ foo = ‘foo’ ]; then echo yes else echo no fi I would expect this to echo yes but instead it echoes no.
jesse_b's user avatar
  • 37.6k
2 votes
2 answers
2k views

Need assistance with writing a bash script that uses regex to validate that password input meets length and special character requirements

I have been working on this for a while, visiting dozens of sites and trying all kinds of combinations; however, I cannot get the script to run as intended. Even when they work in https://regex101....
Punko Brewster's user avatar
-2 votes
1 answer
350 views

How to handle "&" in Echo command [duplicate]

I required to Echo following information but I am getting error. echo Mumbai & Banglore But I am getting error as follows, 'Banglore' is not recognized as an internal or external command, ...
Vips's user avatar
  • 1
2 votes
1 answer
1k views

Delete file whose filename contains a dollar sign

I have a file named ''$'\t' in my directory. How do I delete it? (I suspect the outermost pair of quotes is not part of the filename.)
Norbert S's user avatar
  • 123
-6 votes
1 answer
70 views

Is there an example for a shell or computing accessibility culture aspiring a shell with more special characters and if so what is it? [closed]

I was always a bit frustrated from the lack of characters in modern computer systems such as, from what I know: A global template literal character for which the closest character today is a backtick ...
Lahor's user avatar
  • 123
0 votes
1 answer
88 views

Convenient way to have selected files shown in the beginning of file lists in file managers?

In Windows if one wishes certain file (or directory) to be shown in the beginning of file lists in a file manager (no matter which one, really), one may choose to put the underscore character in the ...
S. N.'s user avatar
  • 297
47 votes
2 answers
7k views

"Ctrl + ." displays "e" character and captures the keyboard shortcut

For a few days now I can no longer use Ctrl+. anywhere (which makes working with Vs Code pretty frustrating). Instead of executing the shortcut an e appears. I can then write normally, and when ...
Aram Becker's user avatar
0 votes
2 answers
706 views

How can I grep for '^M$'? [duplicate]

I'm trying to extract lines from a subtitle (.srt) file. When I grep for a specific line number, I get the answer I expect: % grep -e "^817" ponyo.srt ...
Johnny Rollerfeet's user avatar
0 votes
2 answers
178 views

I want to replace \ with \\\\ using sed

I have tried using sed to read \. Unable to read \ and replace it with \\\\. I want to replace single \ with 4 \\\\.
Karishma's user avatar
7 votes
2 answers
2k views

How to copy a file by using its inode number?

This problem is related to Samba and inodes are not necessary. I have a problem handling a certain file that has some special characters in it. If I search it by its inode it will list the file: $ ...
bomben's user avatar
  • 509
0 votes
0 answers
18 views

rsync won't sync with at symbol (@) in path [duplicate]

I'm trying to rsync a folder on a remote server (Synology) to my server (TrueNAS), but the path has the at/email symbol (@) in it and I think rsync is throwing an error (below) because it's confused ...
crashintoty's user avatar
0 votes
1 answer
1k views

Some Emojis not appearing on browser and some applications in Endeavour OS

I just shifted to arch from ubuntu budgie. and I am getting some issues loading/displaying emojis on some websites and applications. I have provided some screenshots of the issue. The Os I am using is ...
Abhay_K's user avatar
3 votes
1 answer
2k views

Deal with nbsp character in shell

When I use an "alt-gr" character followed by a 'space' character often I miss my input in typing in place of it the "non breaking space character" aka nbsp. Example with piped ...
Le Nain Jaune's user avatar
0 votes
2 answers
1k views

sshpass splitting the password as two strings seperated by the character "&" in password

I have a password variable PASS whose value is abc123&zxcv456 When I try to do SSH in jenkins using the password variable like below sshpass -p ${PASS} ssh -o StrictHostKeyChecking=no admin@100....
light's user avatar
  • 11
2 votes
1 answer
610 views

Special characters in root password in emergency mode

My debian is not starting well and go to emergency mode (with no possibility to avoid it :-(). In order to login, I need to be able to type my root password which contains special characters like é. ...
Guuk's user avatar
  • 915
9 votes
3 answers
1k views

Are ∈ and ℝ symbols available in eqn/roff?

A set of commonly used symbols to represent that a variable belongs to a given real coordinate space are ∈ ("ELEMENT OF", Unicode U+2208) and ℝ ("DOUBLE-STRUCK CAPITAL R", Unicode ...
M.E.'s user avatar
  • 609
2 votes
1 answer
2k views

How to replace Unicode code numbers by UTF-8 characters in a number of files?

I have 500 files that contain escaped Unicode characters like so: Albert Vel\u00e1zquez V\u00e9ronique Ekin etc. The data was queried from a server by a script through XMLHttpRequests and I assume ...
Ned64's user avatar
  • 8,924
4 votes
2 answers
2k views

Difference between wc -c and ${#}?

I've created script, where I encoded string 28 times with base64. Then I wanted to echo count of chars in outputted string. First I used ${#var} which gave me 34070. Then I tried on the same string ...
unnamedrider1337's user avatar
0 votes
1 answer
135 views

How to make bash ignore andsign in xargs command?

My code goes something like this: echo "$result" | xargs -P50 -I@ bash -c '{ printf "@ $(curl --write-out "%{http_code}" -L -s --output /dev/null @)\n"; }' Where result ...
Raywando's user avatar
  • 497
5 votes
3 answers
8k views

What is the difference between a byte and a character (at least *nixwise)?

I understand that any character is comprised of one or more byte/s. If I am not mistaken, at least in *nix operating systems, a character will generally (or totally?) be comprised of only one byte. ...
variableexpander's user avatar
-1 votes
1 answer
862 views

Shortest one-line shell script to print all special characters [duplicate]

I'm looking for a shortest one line shell script to print all special characters in ASCII table (from chr(32) --> chr(127)) Thanks for all your help & support!
tuantm's user avatar
  • 144
0 votes
1 answer
46 views

How can I replace a string with a string that contains a special character, using sed [duplicate]

For example replace keystore=". with keystore="./
patelpkd's user avatar
1 vote
0 answers
1k views

Ubuntu: Display SOH character in Terminal

When using the terminal with Ubuntu 20.04.1 LTS, the SOH character is not being displayed when outputted from a program. The same program also successfully prints the output to a file which correctly ...
p.luck's user avatar
  • 119
0 votes
1 answer
401 views

Matching a string that contains regex tags

I have a bunch of video files with associated subtitles. I am trying to program a bash script that merges the subtitles and videos into matroshka containers. The input video files are named "...
igidrau's user avatar
1 vote
1 answer
409 views

What would cause deleting a character in busybox vi to have garbled text appear on the screen?

I can't seem to figure out why this happens or even what to search for. Two videos demonstrating the issue: https://www.loom.com/share/7497428d757e45399faa5ebcf391e1be https://www.loom.com/share/...
Jeff T's user avatar
  • 121
1 vote
1 answer
3k views

Special Characters in Username for SSH not passing to remote device

I've been trying to beat my head around this. Bing, Google, and Yahoo don't seem to get my question, hence here I am. I have a user D5P$3r that I need to pass from my Linux Server to my router. I've ...
Kenneth Ulrich's user avatar
2 votes
1 answer
387 views

What can the C1 control codes be used for?

Today I discovered that there is a significantly large group of additional control codes, called C1 control codes, spanning from U+0080—U+009F (32 characters). I think that it's an interesting fact ...
psprint's user avatar
  • 241
2 votes
1 answer
279 views

Handle umlauts in file names when using xarg

I've seen some similar questions here where people have problems with xargs handling spaces in file names. Surprisingly, I don't run into this issue, but a similar one. I'm copying a fixed amount of ...
exkrloe's user avatar
  • 21

1
2 3 4 5 6