# means to mask the least possible from the beginning. ## means to mask as much as possible from the beginning. */ means any amount of chars or none, followed by a /
Thus, the result:
Code:
$ echo "${filename#*/}"
first/second/third/fourth
% means to mask the least possible from the end. %% means to mask as much as possible from the end.
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT MOJAVE
sigprocmask
SIGPROCMASK(2) BSD System Calls Manual SIGPROCMASK(2)NAME
sigprocmask -- manipulate current signal mask
SYNOPSIS
#include <signal.h>
int
sigprocmask(int how, const sigset_t *restrict set, sigset_t *restrict oset);
DESCRIPTION
The sigprocmask() function examines and/or changes the current signal mask (those signals that are blocked from delivery). Signals are
blocked if they are members of the current signal mask set.
If set is not null, the action of sigprocmask() depends on the value of the parameter how. The signal mask is changed as a function of the
specified set and the current mask. The function is specified by how using one of the following values from <signal.h>:
SIG_BLOCK The new mask is the union of the current mask and the specified set.
SIG_UNBLOCK The new mask is the intersection of the current mask and the complement of the specified set.
SIG_SETMASK The current mask is replaced by the specified set.
If oset is not null, it is set to the previous value of the signal mask. When set is null, the value of how is insignificant and the mask
remains unset providing a way to examine the signal mask without modification.
The system quietly disallows SIGKILL or SIGSTOP to be blocked.
RETURN VALUES
A 0 value indicated that the call succeeded. A -1 return value indicates an error occurred and errno is set to indicated the reason.
ERRORS
The sigprocmask() call will fail and the signal mask will be unchanged if one of the following occurs:
[EINVAL] how has a value other than those listed here.
SEE ALSO kill(2), sigaction(2), sigsuspend(2), sigsetops(3)STANDARDS
The sigprocmask() function call is expected to conform to IEEE Std 1003.1-1988 (``POSIX.1'').
BSD June 4, 1993 BSD