Sponsored Content
Top Forums Shell Programming and Scripting Preserve space in variable of AWK Post 302492801 by Jotne on Tuesday 1st of February 2011 01:26:36 PM
Old 02-01-2011
Thanks, but how to get it all into awk.
Strange is that it has worked in January if you say it should not work.
I do use the log to et value for munin to graph it, so I do have nice graphs until 1 feb.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to preserve space while concatenating strings? (KSH)

I have these str1=$(echo "This is string one with spaces \n This is also my sentence 1") When I echo $str1, it displays the new line character properly. Now I have another new variable say str2. I want to concatenate in this way.. str1 + newline character + and then str2. That's I... (3 Replies)
Discussion started by: dahlia84
3 Replies

2. Shell Programming and Scripting

awk: Eliminating white space while setting variable

Hi, I have a large flat file from host without delimiter. I'm transforming this file to a csv file using statements like # Row 03: Customer / field position 3059 +20 WOFABNAM=substr( $0, 3059, 20 ); and deleting the trailing whitespaces before and after with that sub( /^ +/, "",... (4 Replies)
Discussion started by: Celald
4 Replies

3. UNIX for Dummies Questions & Answers

awk for variable with a space

Hi experts, why does $ echo "one two three" | awk '{$3="my tree"; print $0}' one two my tree work, but $ var="my tree" $ echo "one two three" | awk '{$3="'$var'"; print $0}' awk: {$3="my awk: ^ unterminated string does not work? How can the variable tha contains a space be... (2 Replies)
Discussion started by: GermanicGalore
2 Replies

4. Shell Programming and Scripting

awk - trim white space from a field / variable

Hi, Consider the data (FS = |): 1| England |end 2| New Zealand |end 3|Australia|end 4| Some Made Up Country |end 5| West Indies|end I want the output to be (i.e. without the leading and trailing white space from $2) England New Zealand Australia Some Made Up Country West... (4 Replies)
Discussion started by: Storms
4 Replies

5. Shell Programming and Scripting

Preserve trailing whitespace in variable

Hello, I wondering how I can echo a string without having the trailing whitespace removed. For example I have a string str="TESTING123 " that I need to hash using sha1. I get the correct answer when I run the line below from the terminal $ echo -n "TESTING123 " | openssl sha1... (3 Replies)
Discussion started by: colinireland
3 Replies

6. Shell Programming and Scripting

awk - How to preserve whitespace?

Given a file: # configuration file for newsyslog # $FreeBSD: /repoman/r/ncvs/src/etc/newsyslog.conf,v 1.50 2005/03/02 00:40:55 brooks Exp $ # # Entries which do not specify the '/pid_file' field will cause the # syslogd process to be signalled when that log file is rotated. This # action... (10 Replies)
Discussion started by: jnojr
10 Replies

7. UNIX for Advanced & Expert Users

Need to remove leading space from awk statement space from calculation

I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation? Here is my query: cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}' 02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies

8. Shell Programming and Scripting

How to preserve spaces in input fields with awk?

I'm trying to do something pretty simple but its appears more complicated than expected... I've lines in a text file, separated by the comma and that I want to output to another file, without the first field. Input file: file1,item, 12345678 file2,item, 12345678 file2,item, ... (8 Replies)
Discussion started by: Armoric
8 Replies

9. Shell Programming and Scripting

How to preserve the value of a variable from being overwritten?

Hi All, I am new new to unix.com, I have a question related to shell scripting. We have a Oracle database backup shell script, which can be used for taking full, incremental & archive log backup based on the parameters passed. Within the script we export a variable as export... (5 Replies)
Discussion started by: veeresh_15
5 Replies

10. Shell Programming and Scripting

Preserve leading white space

I have about 350 programs in which I have to add 2 lines; one before and one after a specfic line. The following script does the job except that I lose the indentation. #!/usr/bin/bash while read line ... (8 Replies)
Discussion started by: jgt
8 Replies
GRAPHVIZ(7)						 Miscellaneous Information Manual					       GRAPHVIZ(7)

NAME
graphviz - rich set of graph drawing tools SYNOPSIS
This manpage has been written to fulfil the need of a centralized documentation presenting all available tools in the graphviz package. AVAILABLE TOOLS
Graph layout programs dot filter for hierarchical layouts of graphs neato filter for symmetric layouts of graphs twopi filter for radial layouts of graphs circo filter for circular layout of graphs fdp filter for symmetric layouts of graphs All of the filters work with either directed or undirected graphs, though dot is typically used for directed graphs and neato for undi- rected graphs. Note also that neato -n[2] can be used to render layouts produced by the other filters. Graph drawing programs lefty A Programmable Graphics Editor lneato lefty + neato dotty lefty + dot Graph layout enhancement gvcolor flow colors through a ranked digraph unflatten adjust directed graphs to improve layout aspect ratio gvpack merge and pack disjoint graphs Graph information and transformation gc count graph components acyclic make directed graph acyclic nop pretty-print graph file ccomps connected components filter for graphs sccmap extract strongly connected components of directed graphs tred transitive reduction filter for directed graphs dijkstra single-source distance filter bcomps biconnected components filter for graphs gvpr graph pattern scanning and processing language prune prune directed graphs Other gxl2dot, dot2gxl GXL-DOT converters AUTHOR
This manual page was written by Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> in november 2006, based on an initial documentation effort by Joachim Berdal Haga <jbh@lupus.ig3.net>. It can be distributed under the same terms as the graphviz package. November 19, 2006 GRAPHVIZ(7)
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy