Skip to content

Tag: bash

how to move Files to a folder using mv in bash with condotions?

I was writing this code to organize my downloads folder so it wouldn’t be messy. i want the files to be moved to their proper folder like for mp4 it should go to the Videos folder. but the code is not working I guess it’s from ‘if’ statement but i don’t know how to fix it because…

Pipe into a shell/bash script from Web URL

How to download a script from URL, execute it, and pipe something into it – all with one command? I have a shell script to which I can pipe stuff: The script is moved to http://example.com/do-stuff.sh Try to do something like this: but it doesn’t work. Data does not get piped into the script. Ther…

How can I combine the commands leave and say?

Is there a way to make use of the command leave and the command say (MacOS) to be notified by the built in voice system? I can do echo hello | say on the command line. leave outputs Time to leave! how can this output be piped to say once it appears? When I issue this command it’s just hanging.

How to convert a directory of XML files in to RRD Files

I need to restore rrd files from my exisiting xml files. So I have used following simple bash script. I could not execute following script due to this error, But I could restore files one by one. Can someone help me to solve this? Answer When you use: You will see that $i equals: /home/dump_xml/a.xml /home/du…