Sponsored Content
Top Forums Shell Programming and Scripting BASH find filenames in list that match certain "pattern." Post 302453425 by SilversleevesX on Wednesday 15th of September 2010 07:50:45 AM
Old 09-15-2010
Quote:
Originally Posted by rdcwayx
some hints for you. With reg:

Code:
[0-9] stands for digital
[a-z] stands for letter

You should be able to do it by yourself.
Don't those need defined letters and numbers to start with? And maybe there's a binary or two I've yet to become acquainted with, but I've never come across a l/Unix command "reg".

Could you give a little more detail?

BZT
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"find command" to find the files in the current directories but not in the "subdir"

Dear friends, please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories.. it is like this, current directory contains file1, file2, file3, dir1, dir2 and dir1 conatins file4, file5 and dir2 contains file6,... (9 Replies)
Discussion started by: swamymns
9 Replies

2. Shell Programming and Scripting

How can expect match the pattern "$", instead of take it as a wild card

I am writing a expect script. during the expect, i need check the out to see whether i logged in: set password "1234" spawn telnet host1 expect "login:" send "guest\n" expect "password:" send $password expect -re "#|$" puts "Logged in" But it seems that expect takes "$" as a wild... (3 Replies)
Discussion started by: sleepy_11
3 Replies

3. Shell Programming and Scripting

bash: How to reuse the search result of "find"

find . -type f -print0 | xargs -0 chmod 600 find . -type f On bash, I would like to pass the search result of "find" to another command as well as to the standard output. The above code performs the same search twice -- once for "xargs -0 chmod" and another for stdout. I would like to... (5 Replies)
Discussion started by: LessNux
5 Replies

4. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

5. UNIX for Dummies Questions & Answers

"Help with bash script" - "License Server and Patch Updates"

Hi All, I'm completely new to bash scripting and still learning my way through albeit vey slowly. I need to know where to insert my server names', my ip address numbers through out the script alas to no avail. I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Discussion started by: profileuser
25 Replies

6. UNIX for Advanced & Expert Users

AIX - io info get from "libperfstat" not match "iostat"

Hi, everyone. I need to write a program to get io info based on libperfstat. But the "write time" of a disk is just half of the value get from iostat. I'm confused and can't explain. Help please. How I calculate "write service time per sec": In iostat: write service... (0 Replies)
Discussion started by: jackliang
0 Replies

7. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

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)
Discussion started by: jcdole
1 Replies

9. Shell Programming and Scripting

Search file containing ps results for a match "my.cnf" and then for a second match . "ok:" and

I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for: my.cnf /bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf after this match I want to search back and match the hostname which is x number of lines back, above the... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
How-To send or update registrations.(3) 			    libeXosip2				   How-To send or update registrations.(3)

NAME
How-To send or update registrations. - eXosip2 offers a flexible API to help you to register one or several identities. Initiate a registration To start a registration, you need to build a default REGISTER request bby providing several mandatory headers osip_message_t *reg = NULL; int id; int i; eXosip_lock (); id = eXosip_register_build_initial_register (identity, registrar, NULL, 1800, &reg); if (id < 0) { eXosip_unlock (); return -1; } osip_message_set_supported (reg, '100rel'); osip_message_set_supported(reg, 'path'); i = eXosip_register_send_register (id, reg); eXosip_unlock (); return i; The returned element of eXosip_register_build_initial_register is the registration identifier that you can use to update your registration. In future events about this registration, you'll see that registration identifier when applicable. Update a registration You just need to reuse the registration identifier: int i; eXosip_lock (); i = eXosip_register_build_register (id, 1800, &reg); if (i < 0) { eXosip_unlock (); return -1; } eXosip_register_send_register (id, reg); eXosip_unlock (); Note: The above code also shows that the stack is sometimes able to build and send a default SIP messages with only one API call Closing the registration A softphone should delete its registration on the SIP server when terminating. To do so, you have to send a REGISTER request with the expires header set to value '0'. The same code as for updating a registration is used with 0 instead of 1800 for the expiration delay. Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 How-To send or update registrations.(3)
All times are GMT -4. The time now is 07:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy