Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
2
votes
2answers
2k views

How tp Print/echo arrow character (not key) in unix - bash, version 3.2.52

How do I print ↑ and ↓ in Unix? I have a script written in bash and I am printing some numbers with whom I want to print arrow keys to show increase/decrease. How do I literally print these arrow ...
137
votes
11answers
192k views

What is `^M` and how do I get rid of it?

When I open the file in Vim, I see strange ^M characters. Unfortunately, the world's favorite search engine does not do well with special characters in queries, so I'm asking here: What is this ^M ...
4
votes
2answers
131 views

delete specific character “[” from a file

I want to remove a character "[" from a file. I tried sed -i 's/[//g' 'filename' however I get the following error sed: -e expression #1, char 6: unterminated `s' command
46
votes
16answers
26k views

How can I delete a file which filename has non-printing characters

I somehow managed to create a file that doesn't seem to have a filename. I found some information regarding how to get more details of the file in the following thread. However, I tried some of the ...
10
votes
2answers
4k views

Is the “tick” or “acute accent” character ´ (not `) 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, ...
-1
votes
3answers
729 views

“bash: !/bin/su”: event not found" [duplicate]

I have line in script which is working, but not working from command line. echo "User ALL = NOPASSWD: ALL, !/bin/su" | sudo tee -a /etc/sudoers [user@localhost ~]$ echo "test ALL = NOPASSWD: ALL, !/...
23
votes
10answers
14k views

How do I type the degree symbol under X11 (using a default English keyboard layout)?

I'm trying to put in an email the temperature outside in degrees. On my Mac, the degree symbol (°) is Option+Shift+8. But I'm writing the email in Thunderbird on an Ubuntu 10.10 with the default US ...
3
votes
0answers
39 views

How to avoid bash from accepting non-printable characters at the prompt?

I recently ran a command at my shell: # yum whatprovides xdotool Error: No Matches found However, my package manager actually has this package: # yum whatprovides xdotool xdotool-1:3.20150503.1-7....
1
vote
0answers
16 views

How to avoid and recover shell command history from an unwanted incursion of non-printable characters?

$ history ... 242 yum whatprovides */bin/xdotool 243 yum provides */bin/xdotool 244 yum provides xdotool 245 yum whatprovides xdotool 246 yum whatprovides xdotool At the prompt: up [...
30
votes
10answers
3k views

Dealing with file names with special first characters (ex. ♫)

I have recently come across a file whose name begins with the character '♫'. I wanted to copy this file, feed it into ffmpeg, and reference it in various other ways in the terminal. I usually auto-...
3
votes
2answers
42 views

less: search, but ignoring special characters

I'm trying to view large log files. I have a complex shell script that will take a log file and run it through a tangle of text-mangling commands to insert formatting and colouring, and pipe the ...
0
votes
2answers
84 views

is it possible to remove a `:~` directory

I can see a directory got created :~ on my server How to delete it as I can't even do cd :~ and I tried deleting it sudo rm -R :~ but I can see a lot of things are inside that folder? What to do to ...
11
votes
2answers
4k views

Match with grep when pattern 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 "$...
1
vote
1answer
54 views

Weird spam of characters 61R;61R;

Not really sure what happened cause I just left it while it was already done downloading and was in the middle of installing phase. So I would like to ask if anyone else has experienced this for me ...
7
votes
3answers
426 views

Why doesn't `echo abc^H` just print `ab`?

As I recall, ^H means Backspace. I generated it by pressing CTRL+V, CTRL+H. So the ^H should remove the last character, as it is the same as Backspace and it should act just as if I pressed Backspace ...
1
vote
1answer
44 views

screen logging - How to ommit interactive shell control characters and prompt?

One of my first questions. Please comment if further explanation or information is required or if the question is not like it's supposed to be here I'm using screen to automatically start servers (...
14
votes
3answers
61k views

Search and replace control characters (^@, ^M, ^I…) in vi

I copied this line from /proc/some_proc_id/cmdline in my ubuntu machine, java^@-jar^@/usr/lib/selenium/selenium-server-standalone.jar^@-port^@4444^@-trustAllSSLCertificates^@ Somehow, the space ...
0
votes
1answer
56 views

Can I make characters uncopyable in a terminal emulator?

I run fish (in gnome-terminal) with a custom style that gives me information about the current Git repository: That's all very fine, but when I want to copy-paste some command with its output like so:...
0
votes
1answer
159 views

echo strings but extra question mark was added to the output

Strange "?" got added to the filename output. SCRIPTS="/path_to_script/" SUMMER=`cat /path_to_file/summer.txt` for i in ${SUMMER}; do cat <<- EOF > $SCRIPTS/20190430_$(echo ${i})_step4.r #...
22
votes
8answers
8k views
13
votes
2answers
61k views

How to use a special character as a normal one?

Many questions like 'How to type the double-quote char (")?' are being asked, and we don't want to clutter our community with the same answer (Type it as \" if not enclosed in 's, " if enclosed in 's.)...
0
votes
0answers
36 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
72 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. ...
112
votes
2answers
10k 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 ...
13
votes
2answers
43k views

What does ^d mean in ls -l | grep ^d?

When I do ls -l | grep ^d it lists only directories in the current directory. What I'd like to know is what does the caret ^ in ^d mean?
1
vote
1answer
1k 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 ...
0
votes
2answers
1k 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&...
0
votes
5answers
1k views

sed command not replacing a text with newline character

The Unix sed command doesn't recognize a backslash escaped n \n as a newline character. For instance, the command sed "s!,!\n!g" is replacing commas in the input text with the letter n and not a ...
4
votes
2answers
1k views

Replace “/U+[0-9A-Fa-f]{4}/” with proper unicode character in shell pipeline with sed eval flag

I am trying to properly visualize the existing characters that listed in the /usr/include/X11/keysymdef.h file. It has lines like: #define XK_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD *...
0
votes
1answer
2k 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 "{\"...
28
votes
3answers
13k views

What is the Mode_switch modifier for?

Playing with xmodmap I encountered a modifier key I hadn't heard of: Mode_switch. It seems to have something to do with inserting special characters. I assigned it to a key but it seems to have no ...
5
votes
6answers
2k views

Rename folder with odd characters

I have a folder on my Mac called "␀␀␀␀HFS+ Private Data". I'm trying to delete it but it contains a bunch of odd characters that are choking unlink, rm and mv, making it difficult to remove it and ...
2
votes
1answer
48 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 ...
87
votes
7answers
93k views

Can't use exclamation mark (!) in bash?

I'm trying to use the curl command to access a http url with a exclamation mark (!) in its path. e.g: curl -v "http://example.org/!287s87asdjh2/somepath/someresource" the console replies with bash: ....
3
votes
2answers
4k views

How do I print 'block' letters in the terminal?

How do I echo/print block lettering in the terminal like: ? figlet and toilet don't help. Neither do U+25A0 or U+2588 unicode characters. This is not a duplicate. As I said, figlet, banner and ...
3
votes
1answer
602 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 ...
2
votes
3answers
5k 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 ...
0
votes
1answer
384 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 ...
1
vote
0answers
152 views

Tab character in exiftool

I need to insert tab character on place of _ between day and hour. exiftool -T -r -filename -CreateDate -d "%Y%"."%m%"."%d_%H%"."%M%"."%S" /Users/***/***/testmapa/mapa2/ > /Users/***/***/testmapa/...
3
votes
2answers
3k 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. ...
5
votes
2answers
1k 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
213 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
757 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 ...
4
votes
1answer
5k views

How to search a log file in Linux and escape special characters like square brackets (i.e. [ and ])

How to search a log file in Linux and escape special characters like square brackets (i.e. [ and ]) Can someone point me in the right direction on this? I less the log file as per below: less ...
10
votes
3answers
28k 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 "...
0
votes
3answers
1k 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
466 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
2answers
1k views

Strange characters when the output of `ls` is redirected to a file

I want to list the components of the current working directory in a text file ls -1 > textfile Output looks fine with more. 1010661085645 1010729039145 1010747080245 1010849051345 1010859053445 ...
2
votes
1answer
391 views

How to print filled shapes in the terminal?

How to print a filled circle or shapes in the terminal like:
3
votes
1answer
10k 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 ...