Skip to content
Advertisement

Tag: shell

Unable to pass filename with space through variable to SCP command

I am trying to set the variable $file as “Unavailable Voucher’s Report_Apr-2017.txt”. It is getting set to the variable successfully. But I am getting an error when I use this variable in a SCP command inside my script. I have tried to replace the ‘ ‘(space) with ‘ ‘(escaping space), still no use. Error be like: Answer Try to double

Redirect the standard output [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 5 years ago. Improve this question Hello and thank you for attention. I am writing my own

Append input URL from user to variable in file using shell script

I have one file test.txt it have already some data named export website_URL and export username= test.txt start.sh here creating new file from test.txt writing data in to data.txt file here if I put input to website_URL=”http://stackoverflow.com/questions/6543841/php-cli-getting-input-from-user-and-then-dumping-into-variable-possible” it is failing with sed: -e expression #1, char 71: unknown option to `s’ this error . So I can store any url

How to log to file inside brackground “watch” command?

I trying to set a watch task running in background and printing to a log file, but when i use the command in background, the files is not written. This is the command that i’m using: then the terminal prints: i try to kill the process: so i want to see the log: But the file is empty ☹️. What

How to store log files of a shell script in HDFS

I have shell script in HDFS. I want to collect the logs for this script in HDFS only. The contents of the script are below: The logs are not appending to the files. only the files are being created. How can I get the files to have the result of the function to be appended in HDFS Answer The logs

Advertisement