Hi,
I would like to assign a pattern to a variable eg test8* or abc etc
The problem I have is that when I assign the pattern to the variable, if any files within the current directory match the pattern then the variable will be evaluated to equal the filenames rather than the literal pattern.... (3 Replies)
Hi everyone,
Im trying to make a new directory based on a name given in a file called directory_file which contains the following content:
garbage gargbage
Directory: running
more garbage gargbage
more garbage gargbage
more garbage gargbage
So basically i have a shell script that... (3 Replies)
I am evaluating a variable from a database and storing it as inside.
The value of the variable is alpha numeric.How can i make this a string type.Any functions for the same. (1 Reply)
Hi all,
I have a variable say var1 (output from somewhere, which I can't change)which store something like this:
echo $var1
name=fred
age=25
address="123 abc"
password=pass1234
how can I make the variable $name, $age, $address and $password contain the info?
I mean do this in a... (1 Reply)
When script is running you only see when some of the commands are not successfull.
Is there a way to see which command are executed and to show the substitution of variables as every line is executed ? (3 Replies)
I am practicing making my own functions in bash for an upcoming exam. For this example, I want to print out a message and maybe add two numbers. What I would do then is:
bash-3.2$ function practice
{
#code to print
#code to add
}
This would be run using an input file, that would... (1 Reply)
This script is executed whenever a new vehicle is added to the cycle-motor park
of campus. The script asks for the following information about the car and adds a new
line to the vehicle file.txt: name (name of an animal, unique identifier), color, mark,
model, type (e.g., electrical, manual),... (2 Replies)
I'm writing a script that goes something like this:
#!/bin/bash
zenity --list --checklist --title="Choose Packages to Install" --width="1000" --height="400" \
--column="Select" --column="Package Name" --column="Description" \
GIMP=$( " " GIMP "GIMP is a free and open source photo editor." ... (1 Reply)
Discussion started by: Defunct_Lizard
1 Replies
LEARN ABOUT DEBIAN
estrdup
ECALLOC(3) BSD Library Functions Manual ECALLOC(3)NAME
ecalloc, emalloc, eread, erealloc, esetenv, estrdup, ewrite -- exit-on-failure wrapper functions
LIBRARY
The roken library (libroken, -lroken)
SYNOPSIS
#include <roken.h>
void *
ecalloc(size_t number, size_t size);
void *
emalloc(size_t sz);
ssize_t
eread(int fd, void *buf, size_t nbytes);
void *
erealloc(void *ptr, size_t sz);
void
esetenv(const char *var, const char *val, int rewrite);
char *
estrdup(const char *str);
ssize_t
ewrite(int fd, const void *buf, size_t nbytes);
DESCRIPTION
These functions do the same as the ones without the ``e'' prefix, but if there is an error they will print a message with errx(3), and exit.
For eread and ewrite this is also true for partial data.
This is useful in applications when there is no need for a more advanced failure mode.
SEE ALSO read(2), write(2), calloc(3), errx(3), malloc(3), realloc(3), setenv(3), strdup(3)HEIMDAL August 14, 2003 HEIMDAL