I'm trying to do a script that will look for a log file if it is already there change the name to another name.
I.E
if log.0 is there
rename to log.1
rename log.1 to log.2
rename log.2 to log.3 and so on.
Only thing is I got no idea where or what is the best command to use for this? ... (3 Replies)
hello i'm trying to figure out how to number a blank line. For instance this :
sed '/./=' file | sed '/./N; s/\n/ /'
gives me
1 aaaa
2 bbbbbb
4 cccccc
5 ffkkkfff
6 ffsdfdfs
I would like something like this:
1 aaaaa
2
3 bbbbbb
4
5 cccccc
And so... (6 Replies)
Hi,
I have several folders full of image sequences from an animation.
The image frames are named Frame0001.png to Frame0900.png, somewhere along the way the images have been named in reverse order.
Is there a script that read the contents of a folder and renumber the files Frame0001.png -... (1 Reply)
Hi All,
My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ','
This has to be done for all the hexstring char* is NULL.
Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Hi,
Is there really a difference between these two, std::hex and ios::hex??
I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true?
Thanks (0 Replies)
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
Would it be possible for a script to duplicate a file and incrementally number it?
File in: XXX_007_0580_xxxx_v0016.aep
File out: XXX_007_0580_xxxx_v0017.aep
If someone knows of a way I'd love to see it.
Thanks! (7 Replies)
Assume I have a file \usr\home\\somedir\myfile123.txt
and I want to replace all occurencies of the two (concatenated) hex values x'AD' x'A0' bytwo other (concatenated) hex values x'20' x'6E'
How can I achieve this with the gnu sed tool?
Additional question: Is there a way to let sed show... (1 Reply)
Discussion started by: pstein
1 Replies
LEARN ABOUT PHP
posix_getgrnam
POSIX_GETGRNAM(3) 1 POSIX_GETGRNAM(3)posix_getgrnam - Return info about a group by nameSYNOPSIS
array posix_getgrnam (string $name)
DESCRIPTION
Gets information about a group provided its name.
PARAMETERS
o $name
-The name of the group
RETURN VALUES
The array elements returned are:
The group information array
+--------+---------------------------------------------------+
|Element | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| name | |
| | |
| | The name element contains the name of the group. |
| | This is a short, usually less than 16 character |
| | "handle" of the group, not the real, full name. |
| | This should be the same as the $name parameter |
| | used when calling the function, and hence redun- |
| | dant. |
| | |
|passwd | |
| | |
| | The passwd element contains the group's password |
| | in an encrypted format. Often, for example on a |
| | system employing "shadow" passwords, an asterisk |
| | is returned instead. |
| | |
| gid | |
| | |
| | Group ID of the group in numeric form. |
| | |
|members | |
| | |
| | This consists of an array of string's for all |
| | the members in the group. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Example use of posix_getgrnam(3)
<?php
$groupinfo = posix_getgrnam("toons");
print_r($groupinfo);
?>
The above example will output something similar to:
Array
(
[name] => toons
[passwd] => x
[members] => Array
(
[0] => tom
[1] => jerry
)
[gid] => 42
)
SEE ALSO posix_getegid(3), posix_getgrgid(3), filegroup(3), stat(3), safe_mode_gid, POSIX man page GETGRNAM(3).
PHP Documentation Group POSIX_GETGRNAM(3)