Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
34 views

How to change the newline position [duplicate]

I have a file that contains string in each line. I used this file as an input in a program that reads them automatically. The program seem to not be able to read the strings correctly. I tried to ...
2
votes
0answers
33 views

How to write romanian special characters with groff?

I've got myself into experimenting with groff and from the start I found out the romanian special characters I type in vim are all fine (I ran setxkbmap ro), but get messed up in the pdf export. ...
2
votes
1answer
31 views

Why can't I open these device nodes?

[root@archlinux xtricman]# ls -l /dev/pts total 0 crw--w---- 1 xtricman tty 136, 0 Feb 24 19:24 0 c--------- 1 root root 5, 2 Feb 24 19:10 ptmx [root@archlinux xtricman]# ls -l /mnt total 12 ...
2
votes
1answer
527 views

How to grep '$$$$$'? [duplicate]

I want to check the absence of the following sequence of characters $$$$$ (i.e., 5 dollar signs) in a json file using grep as it has been used instead of comma to separate fields and I need to make ...
0
votes
1answer
139 views

ssh sqlplus command has $ symbol and it gets substituted

I'm Running some SQLPLUS code over ssh. ssh -q node1 'export ORACLE_SID=DB11D_1;ORAENV_ASK=NO;. oraenv >/dev/null 2>&1;sqlplus -s / as sysdba << ENDSQL whenever sqlerror exit 1 alter ...
9
votes
2answers
3k views

Is the tick or acute accent character (´) used for anything in Linux shell?

We know that the backtick character is used for command substitution: chown `id -u` /mydir Which made me wonder: is the tick character ´ used for anything in the Linux shell? Note: incidentally, ...
5
votes
2answers
808 views

Grep words with special symbols

How do I grep this? (Including the special characters) "Limit reached."[\n]" I tried back-slashing the special symbols but end up not working, like this: grep '\"Limit reached\.\"\[\\n\]\" ' I ...
0
votes
1answer
139 views

Error with grep and find

When I try to execute : $ man find | grep "-mtime" I get this message back : grep: invalid max count I wonder how to search with the -
2
votes
3answers
344 views

How to escape a character in a heredoc bash script

I have a bash script which read an input file and using a heredoc to ssh to a server using expect, but am having issue escaping some special character in the input file. Here is what I have.. I have ...
0
votes
3answers
733 views

How to remove control Z characters from a file?

File has control Z( ^Z) characters in them. I tried sed 's/^Z//g' file_name but not working. Even tried perl script but not removing them. Please let me know if there is way to remove this character.
0
votes
1answer
324 views

How do I remove a special character in a file?

I had to use OCR to get the text of a very large script I did not want to type by hand. I have multiple lines like this echo "<91>ps <97>eF|grep... It should read; echo "`ps -eF|grep......
2
votes
1answer
242 views

How to print filled shapes in the terminal?

How to print a filled circle or shapes in the terminal like:
0
votes
1answer
1k views

curl with Umlaut causes “JSON parse error: Invalid UTF-8 middle byte 0x22” [duplicate]

I'm running below curl command from the command line (Git Bash on Windows) or as part of a Bash Script. curl -s -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d "{\"...
0
votes
2answers
77 views

Printing variable doesn't print \ | / -

I am capturing Kafka startup script output into variable and while starting Kafka prints \ | / - to simulate spinning line. So when I do: res=`./confluent start kafka` echo $res The result is: ...
3
votes
1answer
2k views

Problems with umlauts (can't type in terminal + can't open files)

On my laptop I have Linux Mint 18.3 installed and right now I am experiencing the following problem: As a German I happen to have some files (or directories) that contain umlauts in their names (which ...
1
vote
1answer
962 views

How do I use wget or CURL in php to grab a snapshot of a web page with an asterick * in its URL? (Wayback Machine archive.org question)

The following web page on the Wayback Machine (archive.org) has an asterick * in its URL: https://web.archive.org/web/*/https://www.nasa.gov/ Neither CURL nor wget will allow me to grab the page. I ...
1
vote
1answer
473 views

How to printf literal characters from/to file in bash?

I want to filter a file by character (for the purpose of removing invalid xml characters which I cannot control the generation of) but I cannot seem to even be able to copy individual characters from ...
0
votes
2answers
965 views

How do I remove special characters from a file?

I have a file that contains : <class> these are special @ $ characters / < > & " ' </class> I want to remove all the special characters only, between <class> </class&...
1
vote
1answer
128 views

Different behavior using tab completion from executing `ls`

I noticed this question on ServerFault: FreeBSD: Directory called ^C (really!) - how to remove? I knew about the ^V part long ago. What interests me in that post is that the OP can see the ^C ...
4
votes
3answers
3k views

How to print a variable that contains unprintable characters?

I want to display the value of the $IFS variable, which could contain unprintable characters (for example: newline). I used the following command to do so: echo -n "$IFS" | hexdump -C Which worked ...
0
votes
0answers
320 views

SED and Encrypted Passwords (Dynamically Escape Special Characters?) [duplicate]

SOLVED, Code Updated Below: How is it possible to dynamically escape special characters in sed? It seems like sed cant handle this. Maybe there is another approach to this however. The idea is to ...
2
votes
1answer
6k views

Remove all type of special characters in unix .csv file

I am processing a huge stream of CSV data coming from a source which includes special characters, such as the following: `÷ Þ Ÿ ³ Ù ÷` Here is an example row from a data set which includes these ...
2
votes
1answer
277 views

Weird output on multiline command in Kitty?

I'm running non-GUI ArchLinux on VMWare 14.0. I installed a ssh server on it (by openssh) and connected to my virtual machine by using Kitty 0.70 on Windows 10 [Version 10.0.15063]. My problem is: ...
2
votes
1answer
173 views

Unix - Delete folder with strange characters using inode or similar [duplicate]

I want to remove this folder : Name Name 1x05 name Formación I have tried all I have seen on internet : find -maxdepth 1 -inum INODE_NUMBER -exec rm -i {} \; rmdir: wrong deleting './Name Name ...
0
votes
1answer
39 views

“script” command saves unnecessary letters

When using script to save all of the terminal output, I see strange characters in the saved files, such as [K, [0m, [KM, [C to name a few. While I cat or more the file I don't seem to see this, it's ...
1
vote
2answers
72 views

Problem removing/replacing special character °

I can't seem to eliminate this ° symbol. I have tried: sed 's/°//g' file.txt and sed 's/\°//g' file.txt but both did not work. I'm running ubuntu 16. The symbol does not seem to be detected ...
0
votes
1answer
1k views

Match only ASCII letters in regular expression, ignoring umlauts

I use a regex in my bash script like REGEX="^[a-zA-Z0-9\-]+$" I want to filter out all non standard words, especially words containing german special characters äöüÄÖÜß but according to this manual ...
3
votes
1answer
49 views

Is there any offline manuals for special characters used in terminal?

We can find help regarding most commands like echo ,cp, mv, wget using man . But can I find manuals for special characters used for operations like piping(| symbol)? If there's none, is there any ...
0
votes
2answers
66 views

I accidentally exited vim with :x!~ and now my ~ shows up in a different path

When exiting a file as root, I typed :x!~ and hit enter. Now I have the following: root@host:/etc/shinken/services$ ll total 64K -rw-r--r-- 1 0 0 515 Sep 1 18:24 ~ drwxr-xr-x 2 10003 ...
0
votes
3answers
739 views

Replace forward slash “/” in a file

I'm using vi editor, I have a data like this in a file. 05/08/2017,U,01,116326001 05/08/2017,U,01,116226001 05/08/2017,U,01,116726323 05/08/2017,U,01,116236001 I want to replace the date(1st ...
5
votes
3answers
825 views

How do I properly escape weird characters in a bash script?

I am no professional in scripting or find commands what so ever (Just a warning). I am trying to create a script that can move all my mp3 podcasts to a folder that I can then move to my phone. So ...
10
votes
2answers
3k views

Match with grep when pattern is in variable and contains hyphen “-”

I wrote the following command in order to match $a with $b, but when the value includes "-", then I get an error. How can I avoid that? # a="-Xmx5324m" # b="-Xmx5324m" # # # echo "$a" | grep -Fxc "$...
5
votes
3answers
3k views

How to match a string containing the character “$” with grep?

How to match strings that contain $ character? Example - by the following grep doesn't return the match. param="ambari_parameter$" echo "ambari_parameter$" | grep $param echo "ambari_parameter$...
3
votes
1answer
41 views

Using ! bash history retrieval for commands starting with a digit?

Is it possible to use ! to re-run a bash command line that starts with a digit? I know that, normally, !<digit> selects a command by position, and !<text> selects a command by text. I am ...
1
vote
2answers
510 views

How to remove failed file with backspace in its name? [duplicate]

Sorry if I am not using the right terms for naming these "backspace chars". I would like to clean up a directory that contains two files which looks like they contain backspace in their name. If I ...
0
votes
1answer
75 views

Extract lines from character to character in a loop

I have this line here and it works great to extract lines from a character to a second character (excluding the last line): sed -n -e '/>AB123|x2/,/>/ p' filename | sed -e '$d' > output ...
4
votes
4answers
1k views

Unable to remove the $ sign named files using linux? [duplicate]

Here is my ls command, which shows the list of files in my current directory: rper: ls -l $commandoutput[0] file.txt I tried to remove $commandoutput[0] line by using rm -rf $commandoutput[0], ...
1
vote
0answers
79 views

Question regarding hacked machine and special characters in filename

I'm doing a little bit of forensics on a machine that has apparently been hacked. (Thanks, systemd and your resolv buffer overflow thing. That was awesome. :/ ) Anyhow, I have a pair of 0-length ...
3
votes
3answers
346 views

Control character in awk output

I have the following bash/awk script, which does what I want, except that it adds a control symbol that I do not know what it means. #!/usr/bin/env bash # Merge two cross section files from ...
19
votes
2answers
1k views

Grep: unexpected results when searching for words in heading from man page

I'm running into weird behavior when trying to grep a man page on macOS. For example, the Bash man page clearly has an occurrence of the string NAME: $ man bash | head -5 | tail -1 NAME And if I ...
5
votes
1answer
3k views

AltGr doesn't work in Linux console

When I am in a console (not terminal emulator) (after using Ctrl+Alt+F_, AltGr+key combinations are not working. I am using a Czech keyboard layout which (as many layouts do) maps various special ...
3
votes
0answers
248 views

Control characters in a terminal with an active foreground process

Say I have a process running in a terminal in the foreground. While it is active I can type commands, hit return, and those will be executed once the process is done. Now say furthermore I would like ...
2
votes
0answers
560 views

Question marks in filenames and Samba

I have smbd version 3.6.6 on Linux and mount the share on a FreeBSD system with mount_smbfs. When I try to copy (cp) a filename containing a question mark, I will get the error: No such file or ...
1
vote
0answers
231 views

Using sed to replace string with another string containing special character in ksh [closed]

I am trying to replace @sys with amd64_linux26_rh5.64 with sed command. #!/bin/ksh file_path="/xxx/xxx/xxx/@sys/xxx" os="amd64_linux26_rh5" osver="amd64_linux26_rh5.64" sys="@sys" echo "osver: $osver"...
2
votes
3answers
4k views

Escape unusual characters on filenames with `find . -printf “%p \n”`

The file paths coming from this find command find . -printf "%p \n" do not escape unusual (whitespace, backslash, double quote...) characters. The -ls option does print the escaped paths, but it ...
1
vote
2answers
309 views

How to move files with name containing multiple special char like 'é' 'ä' 'space'?

I am trying to move my files from current dir to another dir. The issue I am having is that multiple files have a name with special characters like space, ü, &, (, .... How can I move all my files ...
112
votes
2answers
9k views

Is Vim immune to copy-paste attack?

You should never paste from web to your terminal. Instead, you should paste to your text editor, check the command and then paste to the terminal. That's OK, but what if Vim is my text editor? Could ...
8
votes
3answers
18k views

BASH and Carriage Return Behavior

I have one quick question. Is it normal that bash (i am using 4.4.11) is not displaying lines/text that is separated / end with plain \r ? I was a bit surprised to see this behavior: $ a=$(printf "...
1
vote
2answers
2k views

To replace special character like Ç by \x01 using sed command

sed "s/Ç//\x01 /g" filename It substitutes it to x01 and not \x01
2
votes
2answers
2k views

why grep “!” shows “bash: !: event not found”? [duplicate]

If I run grep "!" test.txt it will show error bash: !: event not found Well, I know I actually should use grep '!'. But how to understand the above error? I know ! is bash special character. ...