need of opening necessary files in reading (read-only) mode to avoid accidental editing of files such as /etc/resolv.conf or a large config or programming file on a production server. How do I open files in read-only mode in vim text editor on Linux or Unix-like system?
I wanted to curl command to ignore SSL certification warning. Does curl command have a --no-check-certificate option like wget command
on Linux or Unix-like system?
f I want to copy a single file into three locations (directories), by using a single cp command
(e.g. cp file /dir1/ /dir2/ /dir3/
. Would that be possible? If yes, please provide the command for GNU/Linux or Unix operating systems.
am a new bash shell scripting user. How do I find out the size of a file in my bash shell script and store this file size in a bash shell variable?
am a new user and trying to run Python program. I have a cloud based VM/VPS and when I type python mycode.py at the terminal of my server, I get the following error:-bash: python: command not found
How do I solve this problem?
ow do I switch from a ksh shell to bash on Linux or Unix system? How to change shells on Unix-like system?
ow do I store grep command output in shell variable? What is the syntax to store the command output into a variable in Linux or Unix? Continue reading “How to assign a grep command value to a variable in Linux/Unix”