extra space issue with awk


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting extra space issue with awk
# 8  
Old 09-03-2010
If the command has to be:
Code:
lquerypv -h /dev/hdisk#

then your whole syntax is wrong. It should be:
Code:
for diskname in $(lspv |awk '{print $1}')
do
lquerypv -h /dev/$diskname
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk - Removing extra character when setting variable

I have a data file d0 that looks like this: $cat d0 server1 running -n-cv- 8G 3.1% 1435d 15h server2 running -n---- 8G 39% 660d 22h server3 running -n--v- 8G 2.5% 1173d 6h server4 running -n---- 8G 1.1% 1048d 20h... (2 Replies)
Discussion started by: jake0391S
2 Replies

2. Shell Programming and Scripting

Extra Space in output - remove

Hi All I am trying to perform the below operation -count=`cat abc.txt | wc -l` echo$count 5 Head=Start"$DATE"00000"$count"File echo $HEAD START15020300000 5File There is a space coming before 5 which is not needed . How to ignore that . (4 Replies)
Discussion started by: honey26
4 Replies

3. UNIX for Dummies Questions & Answers

#Spool/Query executing with extra space.

Hello, I have a requirement where i have to spool some data to a file. i have achived the desired target but m facing one issue. i have attached the script and the output. i checked the data length in the table but it is only 45 for column 1. can you tell me how to remove these extra... (4 Replies)
Discussion started by: Mohammed_Tabish
4 Replies

4. 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

5. Shell Programming and Scripting

[Solved] Howto remove extra space in the file

Hi Gurus, I have a file which contains some special char or space. when using cat -evt I can see the file as following: 0,"0000","abc/def aaa ... (6 Replies)
Discussion started by: ken6503
6 Replies

6. Shell Programming and Scripting

my shell now adds extra space at end of each line!

Hi, Since today, with csh or tcsh, if I do 'ls files* > list', every lines end with an extra space! What happenned? What can I do to go back when there was no extra space? If I change to bash, there's no extra space. Thanks, Patrick ---------- Post updated at 03:19 PM... (1 Reply)
Discussion started by: trogne
1 Replies

7. UNIX for Dummies Questions & Answers

awk for removing special characters and extra commas

Hi, I have a .csv file which as empty lines with comma and some special characters in 3rd column as below. Source data 1,2,3,4,%#,6 ,,,,,, 1,2,3,4,5,6 Target Data 1,2,3,4,5,6I need to remove blank lines and special charcters I am trying to get this using the below awk awk -F","... (2 Replies)
Discussion started by: shruthidwh
2 Replies

8. Shell Programming and Scripting

Awk while-loop printing extra character

Hi, I'm using a while-loop in an awk script. If it matches a regular expression, it prints a line. Unfortunately, each line that is printed in this loop is followed by an extra character, "1". While-statement extracted from my script: getline temp; while (temp ~ /.* x .*/) print temp... (3 Replies)
Discussion started by: redbluefish
3 Replies

9. Shell Programming and Scripting

m4 adds extra space at top of file.

I have used m4 in the past to generate source code where aesthetics and space were of no consequence . Now I am using it to generate script and program templates . So here is an excerpt from my m4 file for producing a generic bash script: dnl `$Id$' define(`START_SCRIPT',`#!/bin/bash... (8 Replies)
Discussion started by: Bubnoff
8 Replies

10. Shell Programming and Scripting

awk system() prints extra 0 -- why?

Here's the command I'm running: # echo "hi" | awk '{etime = system("hostname") ; close("hostname") ; print etime""}' And here's the ouput: server.domain.tld 0 Why in the world is that second line, the one that's just "0", there? Many thanks in advance. (2 Replies)
Discussion started by: treesloth
2 Replies
Login or Register to Ask a Question
DISKLIST(5)						   File formats and conventions 					       DISKLIST(5)

NAME
disklist - List of partitions to back up for Amanda DESCRIPTION
The disklist file determines which disks will be backed up by Amanda. The file contains includefile directive or disklist entry (DLE). includefile string Default: no default. The name of a disklist file to include within the current file. Useful for sharing disklist among several configurations. Relative pathnames are relative to the configuration directory. A DLE usually contains one line per disk: hostname diskname [diskdevice] dumptype [spindle [interface] ] All pairs [ hostname diskname ] must be unique. Lines starting with # are ignored, as are blank lines. The fields have the following meanings: hostname The name of the host to be backed up. If diskdevice refers to a PC share, this is the host Amanda will run the Samba smbclient program on to back up the share. diskname The name of the disk (a label). In most case, you set your diskname to the diskdevice and you don't set the diskdevice. If you want multiple entries with the same diskdevice, you must set a different diskname for each entry. It's the diskname that you use on the commandline for any Amanda command. Look at the example/disklist file for example. diskdevice Default: same as diskname. The name of the disk device to be backed up. It may be a full device name, a device name without the /dev/ prefix, e.g. sd0a, or a mount point such as /usr. It may also refer to a PC share by starting the name with two (forward) slashes, e.g. //some-pc/home. In this case, the program option in the associated dumptype must be entered as GNUTAR. It is the combination of the double slash disk name and program GNUTAR in the dumptype that triggers the use of Samba. dumptype Refers to a dumptype defined in the amanda.conf file. Dumptypes specify backup related parameters, such as whether to compress the backups, whether to record backup results in /etc/dumpdates, the disk's relative priority, etc. spindle Default: -1. A number used to balance backup load on a host. Amanda will not run multiple backups at the same time on the same spindle, unless the spindle number is -1, which means there is no spindle restriction. interface Default: local. The name of a network interface definition in the amanda.conf file, used to balance network load. Instead of naming a dumptype, it is possible to define one in-line, enclosing dumptype options within curly braces, one per line, just like a dumptype definition in amanda.conf. Since pre-existing dumptypes are valid option names, this syntax may be used to customize dumptypes for particular disks. A line break must follow the left curly bracket. For instance, if a dumptype named normal is used for most disks, but use of the holding disk needs to be disabled for the file system that holds it, this would work instead of defining a new dumptype: hostname diskname [ diskdevice ] { normal holdingdisk never } [ spindle [ interface ] ] The { must appear at the end of a line, and the } on its own line possibly followed by the spindle and interface. SEE ALSO
amanda(8), amanda.conf(5) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHORS
James da Silva <jds@amanda.org> Stefan G. Weichinger <sgw@amanda.org> Dustin J. Mitchell <dustin@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 DISKLIST(5)