Linked Questions

1
vote
1answer
65 views

Can you quote a random string without knowing if it contains special characters?

I'm having trouble inputting random generated passwords into some scripts. I generate the password, and paste it between "". But sometimes it contains characters that sends the whole thing crashing ...
1
vote
1answer
80 views

auto edit a text file

first let me say I have been teaching myself Linux, and I am not "techie" knowledgeable yet. I am using Ubuntu 18.04 and find myself using the BASH to create files I can run. One thing I am trying ...
1
vote
1answer
660 views

In a bash script how do I pass a variable integer to a 'sed -e' command (18.04)

I'm trying to create a bash script that trashes the oldest files in a directory with a variable setting the amount of files to retain. My first step was to count the number of files older than a set ...
0
votes
1answer
74 views

File's order got destroyed while grepping and echoing into for loop

I want to write the result of grep inside for loop into a file, keeping original file structure. Original file: $cat newtest1 some_text /homes/myself/joz ivan petrov - 20/10/19 new customer: /homes/...
0
votes
1answer
1k views

Escape $ in password [duplicate]

How should I escape special characters in bash flyway info -url="jdbc:redshift://server_name/db_name?ssl=true&sslfactory=com.amazon.redshift.ssl.NonValidatingFactory" -password='$PROD_PASSWORD' ...
0
votes
1answer
96 views

Help with deleting files and folders [duplicate]

I am using Ubuntu 16.04lts, I am trying to get rid of a couple of folders. I have tried what I thought to be the correct method, but they seem to fail. $ ls -la total 32 drwxrwxr-x 6 rod rod 4096 ...
0
votes
1answer
75 views

How to reset the admin password on Ubuntu 12.04 if the username has a space [duplicate]

I'm having difficulties resetting admin password on my Ubuntu 12.04 if the username has a space eg. Buggs Bunny? At the prompt it will only display Buggs and wont allow the password command to work
0
votes
1answer
3k views

How can I change directory on bash on Ubuntu on windows? [duplicate]

I cannot change directory like this I have a problem like this:
-1
votes
1answer
79 views

Using “” in shellscript

i need to use a ffmpeg command in a shellscript The command is the next one (ffmpeg -hide_banner -hwaccel cuvid -c:v h264_cuvid -f hls -i $(youtube-dl -f 95 -g $ylink) -c:v h264_nvenc -r 50 -c:a ...
-1
votes
1answer
53 views

How to edit a file that has a space in its name? [duplicate]

I'm on Ubuntu 18.04. If I go into my home directory and right-click and select "new document" and then "empty document", a new file appears called "Untitled Document". Now I want to edit what's in ...
14
votes
0answers
3k views

How do I enter a file or directory name containing spaces or special characters in the terminal? [duplicate]

I have a collection of files and directories with strange names, they contain spaces and the special characters \, *, ), ( and ?. All of them cause problems when I try to use them in the command line ...
0
votes
0answers
16 views

Cannot compile a c++ file on Ubuntu if the filename containes brackets [duplicate]

I ran into this weird error /bin/bash: -c: line 0: syntax error near unexpected token `(' /bin/bash: -c: line 0: `g++ -g 54.Array(300A).cpp -o 54.Array(300A)' The program compiles if I change the ...
0
votes
0answers
609 views

How to pass a stored bash variable to a wget url [duplicate]

I am trying to pass a variable stored in shell script and when It runs the wget command it only returns the website without the variables being passed below is the code I have for the shell script ip=...
0
votes
0answers
19 views

folder navigation [duplicate]

I am having a problem trying to install Microchip's MPLAB X IDE under a newly downloaded install of Ubuntu 18. I don't know if its a problem caused by the command line example given by microchip, or ...
0
votes
0answers
46 views

How to open a directory with spaces in its name from the terminal? [duplicate]

Possible Duplicate: How do I change directory to a folder with special characters? I am trying to open dir in Terminator, but when I want to open dir that consists of two or more words I get ...

15 30 50 per page