Sponsored Content
Top Forums Shell Programming and Scripting awk to add tab to output of both conditions Post 302984189 by RavinderSingh13 on Friday 21st of October 2016 05:01:57 PM
Old 10-21-2016
Hello cmccabe,

Could you please change $0=$0 " found";to$0=$0 "\tfound"; and let me know if this helps you.

Thanks,
R. Singh

Last edited by RavinderSingh13; 10-21-2016 at 06:13 PM..
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

output - tab formatted - awk

Dear All, Good Day. I would like to hear your suggestions for the following problem: I have a file with 5 columns with some numbers in 16 lines as shown below. Input file: Col 1 Col 2 Col 3 Col 4 Col 5 12 220 2 121 20 234 30 22 9... (3 Replies)
Discussion started by: Fredrick
3 Replies

2. UNIX for Dummies Questions & Answers

AWK: add and sum line in output

Hi, I have this output: extended device statistics device r/s w/s kr/s kw/s wait actv svc_t %w %b sd1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 sd2 0.1 2.9 2.6 24.8 0.0 0.1 21.0 0 1 sd3 0.1 2.9 2.7 24.8 0.0 ... (9 Replies)
Discussion started by: mjnman
9 Replies

3. Shell Programming and Scripting

awk three conditions

I'm having a problem pulling UID's from data. The data outputs a user's UID in one of three ways: 1. Error User user_name already assigned with <UID> 2. Success <UID> reserved for user_name 3. <a load of crap because there was a db failure yet somehow the UID is still in there> I typically... (5 Replies)
Discussion started by: MaindotC
5 Replies

4. Shell Programming and Scripting

If conditions in awk

Hello Friends, I need to find some CDRs in production servers whose 1st field value and 2nd field value = 1 and 11th looks like 45.123... where there are more than 3 digits after comma.so i wrote a one liner, something like below but does not work, however when i used first and second conditions... (8 Replies)
Discussion started by: EAGL€
8 Replies

5. Shell Programming and Scripting

awk problems - awk ignores conditions

awk 'BEGIN{ if('"$CATE"'<'"${WARN}"') printf ("%s", "'"`Kfunc "" ; break`"'") else if (('"${CATE}"'>='"${WARN}"') && ('"${CATE}"'<'"${CRIT}"')) printf ("%s", "'"`Wfunc ""; break`"'") else if ('"${CATE}"'>='"${CRIT}"') printf... (6 Replies)
Discussion started by: SkySmart
6 Replies

6. Shell Programming and Scripting

Gawk output separated by tab

In the gawk below, I am trying to output the file tab-deliminated but don't think that is the correct syntax. Thank you :). gawk OFS='/t' '{sub(/-+/,"",$2); ar=$0} END{n = asort(ar) for (i = 1; i <= n; i++) print ar}' file (2 Replies)
Discussion started by: cmccabe
2 Replies

7. Shell Programming and Scripting

awk output seperated by tab

I am just trying to output the below awk separated by tabs. Thank you :). awk (added OFS as an attempt to itroduce tabs) awk '{split($5,a,"-"); OFS='\t' print $1,$2,$3,a}' file.bed > test.bed The awk runs and produces all the data in 1 field instead of 4 fields. current output ... (2 Replies)
Discussion started by: cmccabe
2 Replies

8. Shell Programming and Scripting

awk output is space delimeted not tab delimeted

In the below awk the output is space delimited, but it should be tab delimited. Did I not add the correct -F and OFS? Thank you :). The input file are rather large so I did not include them, but they are tab-delimeted files as well. awk awk -F'\t' -v OFS='\t' 'FNR==1 { next } > ... (2 Replies)
Discussion started by: cmccabe
2 Replies

9. Shell Programming and Scripting

awk to add lines with symbol to output file

In the awk below which does execute I get output that is close, except for all the lines that start with a # are removed. Some lines have one others two or three and after the script adds the ID= to the fields below the pattern in the awk, I can not seem to add the # lines back to the output. ... (5 Replies)
Discussion started by: cmccabe
5 Replies

10. UNIX for Beginners Questions & Answers

awk printing leading tab in output

The awk below executes and produces the current output. it skips the header in row 1 and prints $4,$5,$6 and then adds the header row back. The problem is that it keeps the tailing tab and prints it in front of $1. I could add a pipe to remove the tab, but is there a better way to do it with on... (7 Replies)
Discussion started by: cmccabe
7 Replies
artswrapper(7)							       Arts							    artswrapper(7)

NAME
artswrapper - used to set real-time priority to artsd, the KDE sound system SYNOPSIS
artswrapper [OPTION] DESCRIPTION
artswrapper gives artsd the capability of running with real-time scheduling priority. This helps prevent audio skips and jumps. Except for the check option, artswrapper passes all other arguments directly to artsd. Artswrapper calls the arguments after setting the real-time priority and dropping privileges (if running as setuid root). The real-time status is passed to artsd via the environment variable STARTED_THROUGH_ARTSWRAPPER, and can be one of the following values: unset (not running as real-time), 1 (running as real-time), 2 (no privileges to set real-time scheduling), or 3 (no support for real-time scheduling). OPTIONS
check backward compatibility with old artswrapper. This only prints "okay" and exits. SECURITY
artswrapper must be used as setuid root to have privileges to set real-time scheduling. BUGS
Sometimes artsd locks the system on exit in 2.4 kernels. If this happens, use aKode library, which improves the CPU usage, helps maintain uninterrupted sound, and remove the setuid bit from artswrapper (thanks to Debian documentation and Christopher Martin). SEE ALSO
artsd, artsdsp AUTHOR
Manpage written by Rodrigo Rubira Branco <rrbranco@br.ibm.com> KDE Multimedia Jun 01, 2006 artswrapper(7)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy