Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to search delimiter tab in a line and replace it Post 302224423 by era on Wednesday 13th of August 2008 06:12:53 AM
Old 08-13-2008
By "tab space" do you mean two characters, ASCII 9 and ASCII 32, or one character, just ASCII 9?

If the former, 's/ \t/#/' without the [ ]

If the latter, just 's/\t/#/' should work, although the command line you posted should also (accidentally) work.

If your sed doesn't understand \t then try entering a literal tab. In many shells, you type ctrl-v tab to get an actual tab into your command line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cutting a tab delimiter file

I have a 30 column tab delimited record file. I need to extract the first 10column. The following command to cut was not working cut -f 1-10 -d "\t" filename. Could any one keep on this . Thanks in Advance (4 Replies)
Discussion started by: vinod.thayil
4 Replies

2. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

3. Shell Programming and Scripting

how to replace new line ( \n ) with space or Tab in Sed

Hi, how to replace new line with tab in sed ... i used sed -e 's/\n/\t/g' <filename > but its not working (1 Reply)
Discussion started by: mail2sant
1 Replies

4. Shell Programming and Scripting

Replace spaces between strings in a line with tab

Hi All I am having problem in substitution of any number of spaces, or a combination of space and tab in between strings in the lines of text file. Is there any way out in Perl? Please help me. e.g., Say the input is in the following format:- XX yyy zzz... (1 Reply)
Discussion started by: my_Perl
1 Replies

5. UNIX for Dummies Questions & Answers

Delimiter: Tab or Space?

Hello, Is there a direct command to check if the delimiter in your file is a tab or a space? And how can they be converted from one to another. Thanks, G (4 Replies)
Discussion started by: Gussifinknottle
4 Replies

6. UNIX for Advanced & Expert Users

Search Parameter in first line and replace next line content

Hi, I need help. I have XML file as below &lt;a n=&quot;infoLevel&quot;&gt; &lt;v s=&quot;true&quot;/&gt; &lt;/a&gt; &lt;a n=&quot;localAddr&quot;&gt; &lt;v s=&quot;server.host.com&quot;/&gt; &lt;/a&gt; &lt;a n=&quot;ListenPort&quot;&gt; &lt;v s=&quot;21111&quot;/&gt; &lt;/a&gt; I need to find variable "ListenPort" in line and then replace... (4 Replies)
Discussion started by: rdtrivedi
4 Replies

7. Shell Programming and Scripting

search for a string without fixed delimiter in the line

Hi Need your help to assign the string to a variable from a line which has no fixed delimter in unix. for example , my file contains Name="report"" File Name one="test1" File Name two="test2" now how do I read report , test1 and test2 ? var1=report var2=test1 var3=test2 ... (1 Reply)
Discussion started by: rashmisb
1 Replies

8. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

9. Shell Programming and Scripting

Compare two tab-delimiter files

Hi, I have two files like: file1 chr1 40 chr1 50 chr2 10 chr2 60 file2 chr1 30 chr1 50 chr2 15 chr2 20 and want to get the difference of column 2 when column 1 is the same in both files. (4 Replies)
Discussion started by: linseyr
4 Replies

10. Shell Programming and Scripting

Multiple line search, replace second line, using awk or sed

All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed... I have an input file similar to: &LOG &LOG Part: "@DB/TC10000021855/--F" &LOG &LOG &LOG Part: "@DB/TC10000021852/--F" &LOG Cloning_Action: RETAIN &LOG Part: "@DB/TCCP000010713/--A" &LOG &LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies
SEND_GEARMAN(8) 					  System Administration Utilities					   SEND_GEARMAN(8)

NAME
send_gearman - Submit active and passive check results to a gearman job server DESCRIPTION
usage: send_gearman [ --debug=<lvl> ] [ --help|-h ] [ --config=<configfile> ] [ --server=<server> ] [ --timeout|-t=<timeout> ] [ --delimiter|-d=<delimiter> ] [ --encryption=<yes|no> ] [ --key=<string> ] [ --keyfile=<file> ] [ --host=<hostname> ] [ --service=<servicename> ] [ --result_queue=<queue> ] [ --message|-m=<pluginoutput> ] [ --returncode|-r=<returncode> ] for sending active checks: [ --active ] [ --starttime=<unixtime> ] [ --finishtime=<unixtime> ] [ --latency=<seconds> ] plugin output is read from stdin unless --message is used. Use this mode when plugin has multiple lines of plugin output. Note: When using a delimiter (-d) you may also submit one result for each line. Service Checks: <host_name>[tab]<svc_description>[tab]<return_code>[tab]<plugin_output>[newline] Host Checks: <host_name>[tab]<return_code>[tab]<plugin_output>[newline] see README for a detailed explaination of all options. SEE ALSO
The Mod Gearman documentation is available in /usr/share/doc/mod-gearman/README.html send_gearman 1.3.6-1 July 2012 SEND_GEARMAN(8)
All times are GMT -4. The time now is 10:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy