Sponsored Content
Top Forums Shell Programming and Scripting Find and replace a column that has '' to NULL in a comma delimited using awk or sed Post 302421519 by gumal901 on Friday 14th of May 2010 01:58:25 PM
Old 05-14-2010
Thanks Ygemici and Alister, I did not mention it however I did require the whitespace to stay intact and it did work perfectly. Thanks again.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk/sed column replace using column header - help

$ cat log.txt Name Age Sex Lcation nfld alias xsd CC 25 M XYZ asx KK Y BB 21 F XAS awe SS N SD 21 M AQW rty SD A How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column? so that the final output will become: Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies

2. UNIX for Dummies Questions & Answers

Trim String in 3rd Column in Tab Delimited File...SED/PERL/AWK?

Hey Everybody, I am having much trouble figuring this out, as I am not really a programmer..:mad: Datafile.txt Column0 Column1 Column2 ABC DEF xxxGHI I am running using WGET on a cronjob to grab a datafile, but I need to cut the first three characters from... (6 Replies)
Discussion started by: rickdini
6 Replies

3. Shell Programming and Scripting

Need an awk for a global find/replace in a file, specific column

I am new to unix and awk/sed etc... using C-Shell. Basically, I have a fixed length file that has 4 different record types on it, H, D, V, W all in column 1. I need to change all the W's in column 1 to D's. in the entire file. The W's can be anywhere in the file and must remain in the same... (3 Replies)
Discussion started by: jclanc8
3 Replies

4. Shell Programming and Scripting

Replace last row of a column in bash/awk/sed

Hi, I've got a file with 3 columns which ends like this: ... 1234 345 1400 5287 733 1400 8472 874 1400 9317 726 1400 I want to replace the last row of the last column with the value 0. So my new file will end: ... 1234 345 1400 5287 733 1400 8472 874 1400 9317 726 ... (5 Replies)
Discussion started by: jhunter87
5 Replies

5. Shell Programming and Scripting

Find in first column and replace the line with Awk, and output new file

Find in first column and replace the line with Awk, and output new file File1.txt"2011-11-02","Georgia","Atlanta","x","","" "2011-11-03","California","Los Angeles","x","","" "2011-11-04","Georgia","Atlanta","x","x","x" "2011-11-05","Georgia","Atlanta","x","x","" ... (4 Replies)
Discussion started by: charles33
4 Replies

6. Shell Programming and Scripting

Count number of column in a comma delimited file

I have a comma (,) delimited file. 106232145,"medicare","medicare,medicaid",789 I would like to count the number of fields in each line. I tried the below code awk -F ',' '{print NF-1}' This returns me the result as 5 instead of 4. This is because the awk takes... (9 Replies)
Discussion started by: machomaddy
9 Replies

7. Shell Programming and Scripting

Find for line with not null values at nth place in pipe delimited file

Hi, I am trying to find the lines in a pipe delimited file where 11th column has not null values. Any help is appreciated. Need help asap please. thanks in advance. (3 Replies)
Discussion started by: manikms
3 Replies

8. Shell Programming and Scripting

Replace pipe delimited column string to null

Hi All, I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line)... (4 Replies)
Discussion started by: express14
4 Replies

9. UNIX for Dummies Questions & Answers

Check for not null column in a pipe delimited file

Hi, I have a requirement where I have to check whether the mandatory columns in a pipe delimited file is null and print error message. For eg, I have to check if the 3rd,5th,6th,7th and 8th column are null and print the message "<column name> is null". The data file will have aroung 100,000... (6 Replies)
Discussion started by: reshma15193
6 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
IBOD.CF(4)						     Kernel Interfaces Manual							IBOD.CF(4)

NAME
ibod.cf - configuration file for ibod (ISDN Bandwidth On Demand) DESCRIPTION
This file contains the initial configuration values for the ibod daemon. Each line contains a keyword and a value. Boolean attributes are set with 0 or 1 which corresponds to false and true respectively. A boolean attribute not specified at all is always false. Lines beginning with # are treated as comments and will be ignored. IMPORTANT RULES! 1. Keywords are case sensitive. 2. Kewords must begin at the first column. 3. Keywords and values must be separated by exactly one (1) space or tab character. This file is re-read every time ibod receives SIGHUP (1) signal. OPTIONS DEVICE <name> Name of ISDN PPP device. Default is ippp0. ENABLE 1|0 Enable/disable bandwidth-on-demand. Default is enable (1). INTERVAL <n> Specify the sample time interval in ms. Default is 500 ms. FILTER <n> Defines "filtering factor". A value of 10 means that the average bytes/sec value measured over 10 intervals must pass the limit defined by LIMIT to bring up or down the slave link. Default is 5. LIMIT <n> Transfer rate limit in bytes/sec for bringing up or down ISDN slave channel. Default is 7000. STAYUP 0|1 Enable/disable slave channel stay up function. If enabled, the 2:nd cannel (slave link) will stay up even if the average bytes/sec decrease the value defined by LIMIT. In this case the slave link will stay up until hangup time is reached. (Example: isdnctrl hup- timeout ippp1 60) If disabled the slave link will be brought down in the same way it was brought up. Default is 0. STAYUP_TIME <n> Defines the minimum time in seconds the 2:nd channel will unconditionally stay up after it has been brought up. Default value is 30. SEE ALSO
ibod(1) and xibod(1) AUTHOR
Bjoern Smith, Smith@Compound.SE IBOD.CF(4)
All times are GMT -4. The time now is 12:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy