Hi,
I'm writing a script and have become stuck trying to define a variable (COMP) by adding an elapsed time (ELAPSE e.g 00:55) to a start time (START e.g 23:50).
Can anybody give me a solution as to how I can get a completion time in hh:mm from the variables above?
thanks
Richard (4 Replies)
How can I do this? Actually I have a file which contains a path
e.g.
/home/john/Music/hello.mp3
and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/"
Is this possible?
Thanks, I am sure you'll not disappoint me here!
Oh,... (9 Replies)
Hello all,
I`ve the following problem - I cannot start inetd in any way possible:
bash-3.00# svcs inetd
STATE STIME FMRI
offline Jul_30 svc:/network/inetd:default
bash-3.00#
bash-3.00# svcadm enable -r inetd
bash-3.00# svcs inetd
STATE STIME FMRI... (6 Replies)
Hello. I'm new here and i'm new to slack (concept) as well. I made a connection for pppoe with pppoe-setup, bringed up eth0 with ifconfig but when i try pppoe-connect i get "Cannot determine ethernet address for proxy ARP" and with pppoe-start i get "child pppd process terminated". How can i make... (0 Replies)
I need to change a pattern with single quotes
# echo "serversignature: 'On'"
serversignature: 'On'
I did
# echo "serversignature: 'On'" | sed 's/.*serversignature.*/serversignature: 'Off'/'
serversignature: Off
The output I need is with single quotes. But its swallowing it.
... (2 Replies)
Dear Experts,
I wanted to plot a graph with respect to values from a file.
I'm doing it with Excel 2007, but I want to create the chart in script itself.
I searched in internet for GNUPLOt. But I couldn't understand anything.
Here is my situation. I have a file having values separated by "|".... (7 Replies)
I am trying to extract a string from a line of text. Currently I am using
grep -o 'startofstring(.........'
The string is not always the same size.
The string I'm trying to extract starts with 'test(' ends with ')'.
ex "blah,blah,blah,test(stringoftext),blah blah"
How do I... (4 Replies)
Hello,
I have been browsing through the forum, but unable to find a solution for my requirement.
I need to go through a file and search for /home/users and insert a # symbol at the start /home/users. Example output is #/home/users.
Can you please help me with the awk or sed command for... (1 Reply)
Hello
I'm using cygwin and wouldlike extract information from an xml file according specific values, but don't know how.
Let's say in a file content looks like this:
<tab>
SURNAME=Mustermann
NAME=Max
CUSTOMER SINCE= 18.01.2000
ADDRESS=Birmingham
... (2 Replies)
Discussion started by: witchblade
2 Replies
LEARN ABOUT DEBIAN
shellexp
SHELLEXP(3) Library Functions Manual SHELLEXP(3)NAME
shellexp - match string against a cruft filter pattern
SYNOPSIS
extern int shellexp(const char *string, const char *pattern);
DESCRIPTION
The shellexp() function is similar to fnmatch(3), but works with cruft patterns instead of standard glob(7) patterns. The function returns
a true value if string matches the cruft pattern pattern, and a false value (0) otherwise. Returns -1 in case of pattern syntax error.
Cruft patterns are similar to glob(7) patterns, but are not fully compatible. The following special characters are supported:
? (a question mark)
matches exacly one character of string other than a slash.
* matches zero or more characters of string other than a slash.
/** or /**/
matches zero or more path components in string. Please note that you can only use ** when directly following a slash, and further-
more, only when either directly preceding a slash or at the very end of pattern. A ** followed by anything other than a slash makes
pattern invalid. A ** following anything else than a slash reduces it to having the same effect as *.
[character-class]
Matches any character between the brackets exactly once. Named character classes are NOT supported. If the first character of the
class is ! or ^, then the meaning is inverted (matches any character NOT listed between the brackets). If you want to specify a
literal closing bracket in the class, then specify it as the first (or second, if you want to negate) character after the opening
bracket. Also, simple ASCII-order ranges are supported using a dash character (see examples section).
Any other character matches itself.
EXAMPLES
/a/b*/*c
matches /a/b/xyz.c, as well as /a/bcd/.c, but not /a/b/c/d.c.
/a/**/*.c
matches all of the following: /a/a.c, /a/b/a.c, /a/b/c/a.c and /a/b/c/d/a.c.
/a/[0-9][^0-9]*
matches /a/1abc, but not /a/12bc.
BUGS
Uses constant-length 1000 byte buffers to hold filenames. Also uses recursive function calls, which are not very efficient. Does not vali-
date the pattern before matching, so any pattern errors (unbalanced brackets or misplaced **) are only reported when and if the matching
algorithm reaches them.
SEE ALSO fnmatch(3), glob(3), cruft(8) and dash-search(1).
AUTHOR
This manual page was written by Marcin Owsiany <porridge@debian.org>, for the Debian GNU/Linux system (but may be used by others).
October 17, 2007 SHELLEXP(3)