Skip to content

Tag: bash

A confusion about the alias area of bashrc file

I want write my own alias called oepnserver. The functions of the oepnserver are: show my ip address use python module to start a server on current folder. The detailed code is listed below: When I type oepnserver, my terminal only shows: However, my expectation was I also try to use the ifconfig wlan0 |grep …

find and copy command not working in bash

This line works in the terminal, but not in a bash script: cd /home/me/Downloads/Data/$currentYear/$currentMonth/$currentDay/ find . -name ‘*.wav’ -exec cp {} $tempfolder ; I’m trying to copy all the WAVE files from all the sub-directories to a temporary folder Answer So, I solved it. Turns …

find files modified within given time range

Hello to everyone I’m trying to create a script to search files that modified between X:00-X:59. X is given by the user. I’ve tried this: Any solutions? Answer -newermt primary doesn’t accept a time range in any format. To select files modified within let’s say the period A-B, you need…

Ubuntu initial configuration script errors

I’m newbie to linux and I’m trying to make an initial configuration script for basic users passwords, SSH rules and system config of Hostname & timezone as below, But I’m getting below errors, I couldn’t figure it out. Anyone could help me plz Thanks, Answer I’ve found this o…

making a Hotel management system in BashScript

I am unable to correct the error. I have tried searching on Google but i can’t figure out what my output is referring to. Its giving a line number but the code is right there. “fi” is used at the end of IF statements in scriptfiles. This is my code I am attaching the output too Error while r…