Sponsored Content
Full Discussion: Grep empty space and sort
Top Forums Shell Programming and Scripting Grep empty space and sort Post 302529699 by regmaster on Friday 10th of June 2011 05:45:25 AM
Old 06-10-2011
thanks for reply.

but how do I just grep blank instead of "common"?
I would like to have this output
Code:
12.125.124.176,
12.125.124.177,
12.125.124.178,

instead of

Code:
12.125.124.173,xx1.common.com
12.125.124.174,xx2.common.com
12.125.124.175,xx3.common.com

Thank you.

Last edited by radoulov; 06-10-2011 at 06:50 AM.. Reason: Code tags, please!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How will you list only the empty lines in a file (using grep)

How will you list only the empty lines in a file (using grep) (1 Reply)
Discussion started by: JosephGerard
1 Replies

2. Shell Programming and Scripting

empty space in java command through unix

I need to pass an empty space in the command ="java ......... " as one of the arguments where java calls some java command.... (It accepts it in windows as " ") Thanks in advance SD (2 Replies)
Discussion started by: shweta_d
2 Replies

3. UNIX for Dummies Questions & Answers

Help required on printing the line if third field is not a empty space

Hi Experts, I want to print the lines whose third field in non-empty/blank space. i.e. INPUT FILE/B] dcdccghjrry0yd cont dcdccttrk820529 cont rdekedfsSCr dcdccttrdky2d0y cont rdekedfsSC2 ... (3 Replies)
Discussion started by: krao
3 Replies

4. Shell Programming and Scripting

Grep for empty file

I have a program that takes a file in which I use a sed to remove some data that is not needed. If all of the data is removed. I want to grep for that in the file and print that there is no data left in the file. When I use sed, I replace a word with nothing but it still seems to leave a return... (5 Replies)
Discussion started by: plawr
5 Replies

5. UNIX for Dummies Questions & Answers

sort and find duplicates for files with no white space

example data 5666700842511TAfmoham03151008075205999900000001000001000++ 5666700843130MAfmoham03151008142606056667008390315100005001 6666666663130MAfmoham03151008142606056667008390315100005001 I'd like to sort on position 10-14 where the characters are eq "130MA". Then based on positions... (0 Replies)
Discussion started by: mmarshall
0 Replies

6. Shell Programming and Scripting

Replace space with empty

Hi All, My Input is: 111.121 23212121 121.231 12678878 My output should be 111.12123212121 121.23112678878 in each row i need to replace that perticular space with empty. 8th position in the file for all rows. Please help me in this case .. Thanks (7 Replies)
Discussion started by: raju4u
7 Replies

7. Shell Programming and Scripting

Sort a file content with space

Hello, I need help on. I have a File which stores the information as below. It is space separated file, I want to keep only unique record in file based on file name. Also if you notice sometime filename with space appear in last column like (abc_ xyz1_bc12_20140312_c.xlsx) 03/17/2014 ... (9 Replies)
Discussion started by: kumar30213
9 Replies

8. Shell Programming and Scripting

How to check if the file is empty or has blank space.?

Hi, I am using KSH. I am trying to check if the output file is empty or not. I tried with ] but what i see is my file is empty but still manages to have a size of 1 instead of 0. But my file doesnot have anything its empty. I am not sure how to check this. can any one help? (10 Replies)
Discussion started by: Sharma331
10 Replies

9. Shell Programming and Scripting

Issue using empty variable in grep command

Hi, I'm writing a shell script and trying to grep a variable value, it works fine as long as there is a value in /tmp/list.out which is captured in $DSK but sometimes the file tends to be empty and that is where I'm having an issue while using grep which returns nothing. I know I can use something... (15 Replies)
Discussion started by: mbak
15 Replies

10. Shell Programming and Scripting

Insert newline when grep result is empty

Given a csv file with 40 columns with name, address, hometown etc. I use a bash command in 1 line which: 1. gets the address column and pipes that to 2. grep the first digit and everything that follows Command: awk -F ";" '{print $19}' /Users/jb/Desktop/ReorderTempTotal.csv | grep -o "\d.*"... (7 Replies)
Discussion started by: JBVeenstra
7 Replies
Info::AdslLine(3pm)					User Contributed Perl Documentation				       Info::AdslLine(3pm)

NAME
SNMP::Info::AdslLine - SNMP Interface to the ADSL-LINE-MIB AUTHOR
Alexander Hartmaier SYNOPSIS
# Let SNMP::Info determine the correct subclass for you. my $info = new SNMP::Info( AutoSpecify => 1, Debug => 1, DestHost => 'myrouter', Community => 'public', Version => 2 ) or die "Can't connect to DestHost. "; my $class = $info->class(); print "SNMP::Info determined this device to fall under subclass : $class "; DESCRIPTION
SNMP::Info::AdslLine is a subclass of SNMP::Info that provides information about the adsl interfaces of a device. Use or create in a subclass of SNMP::Info. Do not use directly. Inherited Classes none. Required MIBs ADSL-LINE-MIB MIBs can be found at ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz GLOBALS
none TABLE METHODS
ATUC channel table ("adslAtucChanTable") This table provides one row for each ATUC channel. ADSL channel interfaces are those ifEntries where ifType is equal to adslInterleave(124) or adslFast(125). $info->adsl_atuc_interleave_delay() ("adslAtucChanInterleaveDelay") $info->adsl_atuc_curr_tx_rate() ("adslAtucChanCurrTxRate") $info->adsl_atuc_prev_tx_rate() ("adslAtucChanPrevTxRate") $info->adsl_atuc_crc_block_len() ("adslAtucChanCrcBlockLength") ATUR channel table ("adslAturChanTable") This table provides one row for each ATUR channel. ADSL channel interfaces are those ifEntries where ifType is equal to adslInterleave(124) or adslFast(125). $info->adsl_atur_interleave_delay() ("adslAturChanInterleaveDelay") $info->adsl_atur_curr_tx_rate() ("adslAturChanCurrTxRate") $info->adsl_atur_prev_tx_rate() ("adslAturChanPrevTxRate") $info->adsl_atur_crc_block_len() ("adslAturChanCrcBlockLength") perl v5.12.4 2011-09-28 Info::AdslLine(3pm)
All times are GMT -4. The time now is 06:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy