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 2 years ago.
Improve this question
I have big markdown file. Is there any way to change /foo in my url by /bla. That is, I want to replace
[text](/foo/some-long-url/a.html)
for
[text](/bla/some-long-url/a.html)
(all ocurrences).
I know I could compile markdown file to html and use html parsers (like BeautifulSoup) to do that. But I want to do that, on the source file.
Prefered python or shell solutions.
I mean you can always replace "/foo" to "/bla" directly in the source using sed?
sed 's/\/foo/\/bla/' source.md >> destination.md
If it catches anything unwanted, you can just tweak the regular expression a bit to be more specific.
Related
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 9 months ago.
Improve this question
i have URL https://my.waves.com/:r:/documents%20-/csv%20upload that loaded the screen then show edc_data.csv
above file edc_data.csv file move unix Location(/equ/str/loaded)
can you please how to write shellscripts
Assuming your URL https://my.waves.com/:r:/documents%20-/csv%20upload is correct and links to a CSV file, you can use this script:
#!/bin/sh
curl -L 'https://my.waves.com/:r:/documents%20-/csv%20upload' > /equ/str/loaded/edc_data.csv
exit 0
This will download the file edc_data.csv and put it directly in /equ/str/loaded/.
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 2 years ago.
Improve this question
Hi I'm trying to sync local files to a remote server, the files are copied, but the excluded files are not working.
What I want to exlude is some files, under some different folders for example:
htdocs/index.php
htdocs/.htaccess
htdocs/conf/Configuration.php
rsync -arvz --no-links --exclude-from 'excluded-files.txt' ./htdocs/ user#host:/var/www/test/htdocs/
What's going wrong?
Unless you are using -R, the exclude patterns are matched against the subdirectories of the from directory. In your case you must exclude index.php rather than htdocs/index.php, but that might match too many such files. By adding -R instead, the name you will test against will be ./htdocs/..., so the patterns will work, but you then need to remove htdocs from the destination directory, i.e. user#host:/var/www/test/
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 4 years ago.
Improve this question
I have a code that looks for png files with a specific pattern on the desktop and moves them to another directory.
While going over the files, I want to check if there is the pattern in the name.
This is how I did it:
for %%f in (C:\Users\user\Desktop\*.png) do (
if %%f==Hearthstone Screenshot*.png (
move %%f C:\destination\
)
)
Note: All the needed files start with Hearthstone Screenshot then some numbers.
My main problem is in line 2. I can't make it work.
Depending upon you needs, perhaps this is what you're looking for…
#RoboCopy "%UserProfile%\Desktop" "%UserProfile%\Desktop\HearthStone_Screenshots" "HearthStone Screenshot*.png" /MOV>Nul 2>&1
This should automatically create the holding directory, HearthStone_Screenshots if it doesn't already exist.
Note:I have corrected what I'm assuming to be your very poor spelling issues. If those files and directories should be named using ea instead of ee please re-adjust as necessary.
What's wrong with this:
move C:\Users\user\Desktop\HearthstoneScreanshot*.png C:\Users\user\Desktop\Hearthstonescreanshot\
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 4 years ago.
Improve this question
I have a text file with thousands of this code below which is almost identical apart from it has a different id number. I want to find and delete all instances of this code but I do not know how to do this as find and replace requires the text to be identical. How can I do this? And what text editor on a mac can do this? Eg:
<br><a target='_blank' href='http://example.com/home/details/indexid/1101372'>Read More</a>
<br><a target='_blank' href='http://example.com/home/details/indexid/1101337'>Read More</a>
Use any text editor that allows you regular expression replace. E.g. Sublime Text.
Then do replace with <br><a target='_blank' href='http:\/\/example\.com\/home\/details\/indexid\/\d+'>Read More<\/a>
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 6 years ago.
Improve this question
There is CSV excel file having data of names with some special characters etc like "á" , when it is imported to localhost's phpmyadmin, then in some data "?" is introduced automatically in data.
Probably you have a charset-encoding issue... UTF-8 instead of ISO-something.
Try the below from CSV utf8 import with phpmyadmin
load data local infile 'filename.txt' into table test.unicode CHARACTER SET utf8
... or try to adapt it to your needs we barely can guess from your question ;)