Sponsored Content
Full Discussion: Partial retrieve
Top Forums Shell Programming and Scripting Partial retrieve Post 302848297 by Jotne on Thursday 29th of August 2013 01:48:46 AM
Old 08-29-2013
Code:
awk -F"[][]" '{print $2}' /var/log/maillog
55.66.77.88

This User Gave Thanks to Jotne For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

get partial numbers from a string

Hi Everyone, I have: $val="QQ3_1899_CD4". The output will be: 1899. I did $val =~ /(\d+)/g; the output is 318994, then i use substr to get those 1899. This is not efficient. Is any simple way, like just one line can do? Thanks (1 Reply)
Discussion started by: jimmy_y
1 Replies

2. Shell Programming and Scripting

Partial Delete Lines

Hi, Need to delete line prior to (INSERT/UPDATE/DELETE). In case ' available, then keep that. Pls refet below details. Input ====================== l_s := ' INSERT INTO TEST' l_P PD := ' UPDATE INTO TEST' l_D := ' DELETE INTO TEST' This is test Output... (4 Replies)
Discussion started by: saurabhbaisakhi
4 Replies

3. Shell Programming and Scripting

Question about partial searching

Hi there! New user to UNIX scripting. Had a question I was stuck on. I've been trying to make a script(for a larger project) that would search a file(lets say playerlist). the file is already formatted into columns so it may look like First name(1-10) Last Name(11-20) address (21-30) ... (23 Replies)
Discussion started by: Sagramor
23 Replies

4. Shell Programming and Scripting

AWK - Print partial line/partial field

Hello, this is probably a simple request but I've been toying with it for a while. I have a large list of devices and commands that were run with a script, now I have lines such as: a-router-hostname-C#show ver I want to print everything up to (and excluding) the # and everything after it... (3 Replies)
Discussion started by: ippy98
3 Replies

5. Shell Programming and Scripting

How to replace partial string

I have a list of strings in file: 10 10 AAA 120 13 BBBBB 23 11 CCCCC 11 32 DDDDDD I want to replace first column of the text such as: 10, 129, 23, 11 with 11, 22, 33, 44. I can do line by line, but just not sure how to replace partial string without... (1 Reply)
Discussion started by: ford99
1 Replies

6. Shell Programming and Scripting

URL partial matching

I have two files: file 1 http://www.hello.com http://neo.com/peace/development.html, www.japan.com, http://example.com/abc/abc.html http://news.net http://lolz.com/country/list.html,www.telecom.net, www.highlands.net, www.software.com http://example2.com ... (1 Reply)
Discussion started by: csim_mohan
1 Replies

7. UNIX for Dummies Questions & Answers

How to substitute for the partial match?

Hi I have a question and hope I can get answer here. Thank you in advance. I have two files: file1: aa X bb Y cc Z file2: cc A bb B dd C aa D bb E If the 1st column match in both file1 and file2, the 2nd column in file2 will be replaced by the 2nd column in file1. If there is no... (2 Replies)
Discussion started by: yuejian
2 Replies

8. Shell Programming and Scripting

Partial file pulling

I am connecting to another server through sftp. I am running one batch script to pull file from another server. sometimes i am receiving partial files. I am using below commands in batch script. ls -ltr new.txt mget new.txt bye The file is of 1 MB only.In most of the cases , i received... (6 Replies)
Discussion started by: srinath01
6 Replies

9. Shell Programming and Scripting

Match partial text

I posted the incorrect files yesterday and apologize. I also modified the awk script but with no luck. There are two text files in the zip (name.txt and output.txt). I am trying to match $2 in name.txt with $1 in output.txt and if they match then $1 of name.txt is copied to $7 of output.txt. ... (7 Replies)
Discussion started by: cmccabe
7 Replies

10. Shell Programming and Scripting

Partial Match and Replace

Hi, I have a tab delimited text file like this one. I need to do a partial match of a particular cell and then replace matches with an empty cell. So here is a sample: Smith FordMustang ChevroletCamaro Miller FordFiesta Jones KiaSorrento Davis ChevroletCamaro Johnson ToyotaHighlander I... (4 Replies)
Discussion started by: mikey11415
4 Replies
isdnlog(5)						    Linux System Administration 						isdnlog(5)

NAME
/var/log/isdn.log - isdn log file DESCRIPTION
The main purpose of isdnlog is to create a log file with information about all incoming and outgoing calls, namely: this file. The file has 19 fields, separated by pipe characters "|" with fixed length. The fields are: 1 Time of connect 2 Caller's number (if transmitted) 3 Called number 4 Duration of connection in seconds 5 Duration of connection in 1/100 seconds 6 Time of connect (as usual in seconds since 1970) 7 Number of charge signals received (-1 if you don't get charge signals) 8 I = Incoming or O = Outgoing 9 Cause Code if connection was not established 10 Number of bytes transferred (incoming) 11 Number of bytes transferred (outgoing) 12 Version number of isdnlog 13 ISDN Service Code 14 1 = called by isdn user, 0 = called by analog user 15 Costs per charge unit (e.g. 0.062 in Germany) 16 Currency of charge unit (e.g. EUR in most parts of Europe) 17 Total cost of connection 18 Provider 19 Zone FILES
/var/log/isdn.log This file: isdnlog log file. SEE ALSO
isdnlog(8) AUTHOR
This manual page was written by Andreas Jellinghaus <aj@dungeon.inka.de>, for Debian GNU/Linux and isdn4linux. Now maintained by Paul Slootman <paul@debian.org>. ISDN 4 Linux 3.13 2002/01/31 isdnlog(5)
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy