how can I download a file from a url(not a direct url) in Linux [closed] - linux

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am trying to download a file from below url by using wget command.
http://fx.kebhana.com/FER3701D.web?targetMethod=doTxtDownload&regdate=20160602
wget http://fx.kebhana.com/FER3701D.web?targetMethod=doTxtDownload&regdate=20160602 -O test.txt
when I type this url in browser it creates text data file and downloads it.
I need to do exact same thing in Linux server.
I found someone asked the same question.
I tried all the solutions of the comments and answers in here, but couldn't solve the problem.
https://unix.stackexchange.com/questions/145946/downloading-files-using-wget
If there is any solution, please let me know.
Thanks.

You need to put quotation marks around the URL because of the special characters:
wget "http://fx.kebhana.com/FER3701D.web?targetMethod=doTxtDownload&regdate=20160602" -O test.txt

Related

Getting SyntaxError: JSON5: invalid character '\"' at 3:5 (REACT Project) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
Picture of file with error code
Here is a link to a picture of the file with the error code message above ^^.
I get this error whenever I try to run "npm run dev"
I'm not sure if this picture shows enough detail, so, tell me if there is more detail I should include because I have no clue.
Is there something in this file I should manually edit or are there any commands I should type to fix this issue?
I tried reinstalling nodejs many times and creating a new project. Can someone actually give me a suggestion on what might be causing this issue?
Please add more detail like which rpm version you are using it. It seems some package version mismatching issue.

whenever I use "sudo su", i'm getting "bash: export : = not a valid identifier". I'm new to linux. Please excuse for not being more informative [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I'm using UBUNTU 20.04,wayland. However I'm getting root privileges after that two messages.
The root .bashrc file has a line that looks like this:
export PATH = /snap/bin:/usr/local/sbin/...
Get rid of the spaces around the =.
export PATH=/snap/bin:/usr/local/sbin/...

Portable bourne shell script without using functions of modern shells as bash, ksh, zsh etc [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
First of all I want thank all of you who will help me solve this. I have an exam tomorrow and I have to prepare this script for the exam. I am really new to linux and those bourne shell script.
My project should be a portable bourne shell script which scans a directory for the following files: header.txt, footer.txt and content.txt. The content of the files should be read but ignoring the lines starting with # and this content should be used for generating an HTML page with the following header, footer and content. This files can contain any text and/or HTML code but the cannot contain head and body tags. When scanning the directory the script have to compare the date of the last change of the files (header.txt, footer.txt and content.txt) with the date of the last change of the HTML page (if you have one already) and if the date of the last edit on the files is newer than the one on the HTML page the script should generate a new HTML page with the latest content.
Guys thank you very much as this is very important for me. Please help me getting this done.
Thank you very much!
To remove lines beginning with # try this:
grep -v "^#" file
To remove lines that may contain spaces (or blank characters) before a #:
grep -v "^[[:blank:]]*#" file

Error in shell script and how to write to a file [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am writing a shell script that is extracting the data from a command:
I have tried running the script in both the vi and vim editor. But everything in vain.
Please help me out. And how write the output of this in a file.
It may be noted that this is just a starting point so the script will produce multiple files so
I cannot write:
Script_name > filename
I think this question is fine now, the input file is good enough after edit, I can fully understand what you ask for now.
With awk, you need learn to use 2-d array, it will simplify the code.
awk 'BEGIN{print "Instance id Name Owner Cost.centre"}
/TAG/{split($0,a,FS);a[4]=tolower(a[4]);$1=$2=$3=$4="";b[a[3],a[4]]=$0;c[a[3]]}
END{for (i in c) printf "%-18s%-26s%-14s%-20s\n",i,b[i,"name"],b[i,"owner"],b[i,"cost.center"]}' file
Instance id Name Owner Cost.centre
i-e1cfc499 Memcached
i-7f4b9300 Test_LB01_Sachin
i-c4260db8 Rishi_Win_SAML Rishi Pandey
i-fb5ca283 CLIQR-DO NOT TOUCH mataa 1234

How to download all subtitles from Opensubtitles.org in a specific language? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Excuse me if this post is not related to this forum, but I couldn't find any other place to ask my question. It would be appreciated if you introduce me a suitable place for this post.
By the way, I am trying to download all the subtitles from Opensubtitles.org in a specific language (say English) and find their translations in another language (say Arabic). I tried wget, but I couldn't download anything useful from this site. (I need .srt, .zip and .txt files)
Can everyone help me?
Bests.
Downloading everything individually will put an unnessesary load on their servers. Better use something like http://opus.lingfil.uu.se/OpenSubtitles.php
The download link is something like:
http://dl.opensubtitles.org/en/download/sub/4617044
Where 4617044 is the ID of the subtitle. You can use this URL with wget to download it, but it won't have the correct filename.
Alternatively, you can use the XML-RPC api to search and download subtitles.

Resources