07-22-2009
what do you mean not working? why do you use "\<"*".*\>"?
^ - denotes first char of the string
$ - last char of the string
my sample above came from my bash shell.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a program that displays many messages on stdout.
I have another file that contain error messages only - Each line is a separate message. (msgs.txt)
I am trying to show only the errors and not all the output.
I tried this but got nothing:
myprog | grep < msgs.txt
I also tried... (2 Replies)
Discussion started by: GMMike
2 Replies
2. UNIX for Dummies Questions & Answers
Hey all! I'm trying to search a file and return all instances of a word, let's say 'foo' in this case, as long as it's not a function name. For example:
1) int foo; //OK
2) //'this is totally fooed up' is also OK
3) int foo (int x, int y) //not ok to return
I've tried a lot of regular... (7 Replies)
Discussion started by: Jombee
7 Replies
3. UNIX for Dummies Questions & Answers
I wrote a simple korn shell where I am trying to filter all the good record layouts of a file to only leave the bad ones to look at. That file is hudge. Aside from '# comments' and 'var=ssss', all record should follow a specific record layout, with comma seperated fields. Some fields can have any... (2 Replies)
Discussion started by: Browser_ice
2 Replies
4. Shell Programming and Scripting
hi everybody
I am a new user to this forum and its previous posts have been very useful. I'm searching in a file using grep for patterns like
12.13.444
55.44.443
i.e. of form
<digit><digit>.<digit><digit>.<digit><digit><digit>
Can anybody help me with this.
Thanks in advance (4 Replies)
Discussion started by: jpriyank
4 Replies
5. Shell Programming and Scripting
Hi,
I have a file as below,
{####
if file
then
file
else
file
}
print file
i need to fine the count of all the pattern - file, inside the { }
i'm using a grep command as
grep -c \{'*file*'\} fake.sh\
It doesn't gives me any result, i think the problem here is the... (5 Replies)
Discussion started by: divak
5 Replies
6. Shell Programming and Scripting
I need to replace occurrences of twelve asterisks "************" with the string " 0000000.00" . Note that there are two spaces in front of the first zero. How can I do this using awk or sed? (3 Replies)
Discussion started by: mustang_9333
3 Replies
7. Homework & Coursework Questions
Please dont delete, im listing my assignment and will be editing as i work on it. I am NOT looking for answers but help in understanding how to use grep
1. The problem statement, all variables and given/known data:
For each question, list the command lines used in addition to any other details... (3 Replies)
Discussion started by: alindner
3 Replies
8. UNIX for Dummies Questions & Answers
I am trying to print columns from a table whose name (header) matches a certain string.
E.g.,
patient1001 patient1002 patient2005 patient3005 patient4001
0 0 0 0 0
2 9 2 8 3
2 7 3 0 2
Say I want to print columns whose names end with "01"
patient1001 patient4001
0 0
2 3
2 2
... (3 Replies)
Discussion started by: quextil
3 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Given a text file (big_english.txt) containing roughly 250,000 words, answer the following using grep and... (2 Replies)
Discussion started by: blahblahblah123
2 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
For the past many days I have solved a lot of grep and regular expression questions, Now I am in a search for a good quality set of questions that can help me build and check my knowledge of grep with regular expressions, it would be great if anyone could help me with my requirement.
... (1 Reply)
Discussion started by: rahulkalra9
1 Replies
LEARN ABOUT DEBIAN
safe_asterisk
SAFE_ASTERISK(8) Linux Programmer's Manual SAFE_ASTERISK(8)
NAME
safe_asterisk -- A wrapper to run the asterisk executable in a loop
SYNOPSIS
safe_asterisk [ asterisk_params ]
DESCRIPTION
safe_asterisk is a script that runs asterisk in a loop, which can be useful if you fear asterisk may crash.
The script does not run in the background like a standard service. Rather, it runs in its own linux virtual console (9, by default). It
also uses the option '-c' of asterisk(8) to avoid detaching asterisk from that terminal.
safe_asterisk also runs asterisk with unlimited core file size, and thus asterisk will dump core in case of a crash.
To get a "picture" of console 9, from another terminal (e.g: from a remote shell session) you can use:
screendump 9
The init script of the Debian package should be able to run safe_asterisk as the asterisk service, if so configured. See coments in
/etc/default/asterisk
FILES
/tmp
safe_asterisk runs in that directory, rather than in / as usual.
/tmp/core
If core files were generated there, they may be
/etc/asterisk/startup.d
Files in this directory will be 'source'd by the safe_asterisk script before it starts Asterisk proper, allowing them to set addi-
tional environment variables or run any other steps that are needed for your system.
BUGS
While showing the output on a console is useful, using screen(1) as the terminal may be better.
The script does not read configuration from standard location under /etc
It uses fixed locations under /tmp , and thus may be exposed to a symlink attacks.
SEE ALSO
asterisk(8), screendump(9)
AUTHOR
This manual page was written by Tzafrir Cohen <tzafrir.cohen@xorcom.com> Permission is granted to copy, distribute and/or modify this docu-
ment under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
Asterisk Jun 30th, 2005 SAFE_ASTERISK(8)