Skip to content

Tag: shell

‘Housekeeping’ script to create folder and move files

I have been trying to investigate how to automate a script (shell or other) that periodically (once an hour for example) moves files with a constant naming convention to a folder (which is automatically created if not already there). The files are like this: Camera1_01_20171213221830928.jpg Camera1_01_2017121…

parsing complex string using shell script

I’m trying the whole day to find a good way for parsing some strings with a shell script. the strings are used as calling parameter for some applications. they looks like: I’m only allowed to use shell-script. I tried to use some sed and cut commands but nothing works fine. My tries are like: that…

Bug while checking for symbols inside of a string?

I’m creating a small calculator script and I’ve got stumbled on a strange bug. Everything seems to work but not when I input anything starting with (. When I do that if gives false and the code inside of else executes. I’ve tried a lot of ways rewriting how should “$input” =~ [-,…

Recursively check the difference between files in shell

I am trying to recursively check the difference between files in 2 separate directories in shell. NOTE :- both directories are identical only the root name is different In the diagram shown above I want to “diff ROOT_A/A.md5 ROOT_B/A.md5” recursively in my script file for all files in the root dir…