Sponsored Content
Full Discussion: Dynamic Grep
Top Forums Shell Programming and Scripting Dynamic Grep Post 302512912 by Chubler_XL on Monday 11th of April 2011 10:55:46 PM
Old 04-11-2011
Code:
sed -n 's/Deleting Text .*ESN: \(.*\)).*"\(.*\)".*/\2 - \1/p' $LOGFILE


Last edited by Chubler_XL; 04-12-2011 at 01:12 AM..
This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

why to use dynamic cast in c++

class base { public: virtual void disp() {cout<<"from base\n";} }; class derv : public base { public: void disp() {cout<<"from der\n";} }; int main() { base *b=new derv; b->disp(); derv *d; d=dynamic_cast<derv*>(b); d->disp(); return(0); (0 Replies)
Discussion started by: sarwan
0 Replies

2. OS X (Apple)

Dynamic DNS

I have a need to regularly add all macs in our domain to dns. Ideally it would work like Wintel machines. Transparently and automatically. What are the tools, scripts, roadblocks to doing so? I'm not talking about DynDNS type of service here. This is the internal dns for where I work. (0 Replies)
Discussion started by: [MA]Flying_Meat
0 Replies

3. Shell Programming and Scripting

Dynamic Menu Help

I'm working on a menu to read folders in as menu selections then CD to the selected folder and display the contained files as menu selections for execution. I'm using the following to read in the file list but I get lost after that. I only read in files that begin with CAPs. The problem is... (3 Replies)
Discussion started by: ScottKe
3 Replies

4. Shell Programming and Scripting

MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else

Hi Guys, I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys. MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' ` Harby. (4 Replies)
Discussion started by: hariza
4 Replies

5. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

6. UNIX for Advanced & Expert Users

Dynamic Tunnel

Hi All, Anyone here already done similar to the queries below ? Is there is a way to have a setup that would allow an SA to easily hook any prod server (external ip) to an internal ip without network reconfigurations ? Your comments here will be much appreciated. Thanks (4 Replies)
Discussion started by: linuxgeek
4 Replies

7. Shell Programming and Scripting

Help with Dynamic variable

I need some variable help TEMP1=Jane TEMP2=Sue X=1 eval USER=TEMP${X} echo $USER This gives output USER1 I would like to get Jane I have tried eval USER='TEMP${X}' eval USER="TEMP${X}" eval USER=`TEMP${X}` (3 Replies)
Discussion started by: Jotne
3 Replies

8. Shell Programming and Scripting

dynamic string searching for grep

hi my code is something like count=0 echo "oracle TABLESPACE NAME nd TARGET" while do count=`expr $count + 1` (1) tts_space_name$count=`echo $tts | cut -d "," -f$count` (2) target$count=grep $(tts_space_name$count)... (2 Replies)
Discussion started by: Gl@)!aTor
2 Replies

9. Shell Programming and Scripting

dynamic thread in grep

hi name$count = some dynamic value now i want to use dat dynamic value in grep so how m i supposed to do dat i tried `grep $(name$count) source` , it is not working ...... what will be after grep so dat i will be... (4 Replies)
Discussion started by: Gl@)!aTor
4 Replies

10. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
SHAR(1) 						    BSD General Commands Manual 						   SHAR(1)

NAME
shar -- create a shell archive of files SYNOPSIS
shar file ... DESCRIPTION
The shar command writes a sh(1) shell script to the standard output which will recreate the file hierarchy specified by the command line op- erands. Directories will be recreated and must be specified before the files they contain (the find(1) utility does this correctly). The shar command is normally used for distributing files by ftp(1) or mail(1). EXAMPLES
To create a shell archive of the program ls(1) and mail it to Rick: cd ls shar `find . -print` | mail -s "ls source" rick To recreate the program directory: mkdir ls cd ls ... <delete header lines and examine mailed archive> ... sh archive SEE ALSO
compress(1), mail(1), tar(1), uuencode(1) HISTORY
The shar command appeared in 4.4BSD. BUGS
The shar command makes no provisions for special types of files or files containing magic characters. The shar command cannot handle files without a newline (' ') as the last character. It is easy to insert trojan horses into shar files. It is strongly recommended that all shell archive files be examined before running them through sh(1). Archives produced using this implementation of shar may be easily examined with the command: egrep -v '^[X#]' shar.file BSD
June 6, 1993 BSD
All times are GMT -4. The time now is 04:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy