I am developing a mini shell for a university practice and I run into an error that I have not been able to solve since according to what I have understood, searching in Google for my error, it is an error that can come out of several causes.
Le...
How can I get the format of a specific date?
I have the following date:
18APR01
but that format I do not want,
The code that I have is the following:
date --date=18APR01 +%Y-%m-%d
Exit:
2001-04-18
What I really want is for the out...
I have a little bash script that does not work the way I want to
Here is the code
#! /bin/bash
echo "Escriba la cantidad de letras"
read x
for i in $x;do
echo "Letra $i"
read y
echo $y
done
#export Mensaje
#./recibir.sh
Image of the log...
I get an error when starting httpd in centOS 7. I tried restarting with
systemctl restart httpd.service
and also
systemctl start httpd.service
and I keep getting the same error, I've done it as root. It is worth mentioning that previo...
I'm developing a utility in a bash shell script (file.sh), I can generate colors when the output goes to console, for example with a code like:
echo -e "\e[1;33m Aqui el mensaje \e[0m";
But my idea is to create a log file as identical as po...
Description:
I need to take a date in dd / mm / yyyy format and increase the day.
For example, having a date 01/01/2017 , the idea is to have the following output:
02/01/2017
Code:
I am trying with date -d "${fecha_ultim...
This is the code I was testing, but for some reason the output I get is nothing.
#include <stdio.h>
#include <stdlib.h>
int main (int argc,char*argv[], char *envp[]){
FILE *fp;
char path[1035];
fp=popen("/bin/echo ${CO...
I'm trying to make a shell script that takes numeric data that are usually decimal of type 0.00004 and I have to square them. Using "bc" the result I get 0.
Example:
echo "(0.0000003+0.0000005)^2"|bc
0
Looking at the help of bc, he says...
I'm trying to create a script .sh to capture the action of a dialog on Mac that shows the buttons No and Si , and then execute code depending on the answer, I have not managed to make it take the actions of the user.
This...
I am new in the bash language (GNU / linux) and a question has arisen in an exercise: I have to go through all the files in a directory, and for those that are executable, I save a variable 1, or a 0 in case of not being executable.
I tried t...