Sponsored Content
Top Forums Shell Programming and Scripting Extracting 3rd column using awk from file with spaces. Post 302407779 by ricnetman on Friday 26th of March 2010 11:33:35 AM
Old 03-26-2010
Thanks Aliister;

The last answer put everything together for me.

In our environment, we used symetrix disk arrays. And we use an EMC NetWorker module for performing snapshot backups.

In addition to having the correct modules in place, a "symm.res" file AKA a "sets" file needs to be generated that has the serial number of the symm e.g. 000190102326, and a standard device and a virtual device e.g. 1C13 26BF.

There are three types of clones used on symms BCVs, Clones, and VDEVS.

We had already created a script for clones but did not know the correct sym commands to use to render the same results for VDEVs, and ran out of time, so I thought it would be prudent to use a combination of awk and other commands to achieve the same results until my colleague had time to modify our script script.

Thanks to all of you for the help.

ricnetman
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting a column using AWK

Hi, I've a text file like ABC,,100 A,100,200 In the above example, I have 3 columns. I want to extract the second column. I'm expecting a value like 100 i.e first record will not have any value but still it has to give me null value. second record should give 100. Can anybody... (2 Replies)
Discussion started by: ronald_brayan
2 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

Awk multiple lines with 3rd column onto a single line?

I have a H U G E file with over 1million entries in it. Looks something like this: USER0001|DEVICE001|VAR1 USER0001|DEVICE001|VAR2 USER0001|DEVICE001|VAR3 USER0001|DEVICE001|VAR4 USER0001|DEVICE001|VAR5 USER0001|DEVICE001|VAR6 USER0001|DEVICE002|VAR1 USER0001|DEVICE002|VAR2... (4 Replies)
Discussion started by: SoMoney
4 Replies

4. Shell Programming and Scripting

Use awk to have the fourth column with spaces

Hi Gurus, We have a ftpserver from which we do a dir command and output it to a local file. The content of the ftpfile is: 07-15-09 06:06AM 5466 ABC_123_ER19057320090714082723.ZIP 07-15-09 06:07AM 3801 ABC_123_ER19155920090714082842.ZIP 07-15-09 06:07AM ... (14 Replies)
Discussion started by: donisback
14 Replies

5. Shell Programming and Scripting

Extracting a column from a file and merging with other file using awk

Hi All: I have following files: File 1: <header> text... text .. text .. text .. <\header> x y z ... File 2: <header> text... text .. text .. (4 Replies)
Discussion started by: mrn006
4 Replies

6. Shell Programming and Scripting

extracting row with max column value using awk or unix

Hello, BC106081_abc_128240811_128241377 7.96301 BC106081_abc_128240811_128241377 39.322 BC106081_cde_128240811_128241377 1.98628 BC106081_def_128240811_128241377 -2.44492 BC106081_abc_128240811_128241377 69.5504 FLJ00075_xyz_14406_16765 -0.173417 ... (3 Replies)
Discussion started by: Diya123
3 Replies

7. Shell Programming and Scripting

AWK script to create max value of 3rd column, grouping by first column

Hi, I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column. clientname,day-of-month,max-users ----------------------------------- client1,20120610,5 client2,20120610,2 client3,20120610,7... (3 Replies)
Discussion started by: ckmehta
3 Replies

8. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

9. Shell Programming and Scripting

How to awk or grep the last column in file when date on column contains spaces?

Hi have a large spreadsheet which has 4 columns APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96034 Storage Mgmt Team APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies

10. Shell Programming and Scripting

Solution for replacement of 4th column with 3rd column in a file using awk/sed preserving delimters

input "A","B","C,D","E","F" "S","T","U,V","W","X" "AA","BB","CC,DD","EEEE","FFF" required output: "A","B","C,D","C,D","F" "S", T","U,V","U,V","X" "AA","BB","CC,DD","CC,DD","FFF" tried using awk but double quotes not preserving for every field. any help to solve this is much... (5 Replies)
Discussion started by: khblts
5 Replies
PCINITRD(8)						      System Manager's Manual						       PCINITRD(8)

NAME
pcinitrd - create a PCMCIA initrd ram disk image SYNOPSIS
pcinitrd [-v] [-a] [--all] [-d alternate-root] [--dir=alternate-root] [-r kernel-release] [--release=kernel-release] [-s image-size] [--size=image-size] [-u] [--update] initrd-image [modules ...] DESCRIPTION
The pcinitrd script creates an initrd ram disk image for booting with the root filesystem on a PCMCIA device. If the target is a block special device (i.e., /dev/fd0), then the initrd image is created on that device. If the target does not already exist or if it is an ordinary file, then pcinitrd will create the image file using the ``loopback'' device. Modules are specified with paths relative to /lib/modules/[kernel-release]. The core PCMCIA modules (pcmcia/pcmcia_core and pcmcia/ds) will automatically be installed in the target image. All other device-specific modules need to be listed on the command line, along with the appropriate socket driver (pcmcia/i82365.o or pcmcia/tcic.o). Alternatively, if -a is specified, then all available PCMCIA socket drivers and block device drivers will be included in the image. Additional files to be copied to the initrd image may also be listed on the command line. Executable programs will be installed in /bin, shared libraries will be installed in /lib, device files will be installed in /dev, and any other files will be placed in /etc. The startup script in the resulting image, linuxrc, may need to be customized for a particular system. It contains the same variable defi- nitions as the normal PCMCIA startup scripts (i.e., PCIC=, PCIC_OPTS=, and CORE_OPTS= variables). The /etc/config.opts file may also need to be edited. Any changes to linuxrc or config.opts will be preserved if pcinitrd is executed in ``update'' mode. Another feature of the generated linuxrc is that if the DEBUG variable is set to a non-blank string at the boot prompt, then cardmgr will echo all its status messages to the console, and after linuxrc executes, it will fire up a shell on the console. This can be helpful for debugging initrd problems. However, few commands are available in the normal initrd environment. OPTIONS
-v Verbose mode. Identify files as they are copied. -a, --all Install all socket drivers and block-style PCMCIA device drivers, including memory card, SCSI card, and fixed-disk drivers. This is mainly intended for use by package maintainers. -d alternate-root, --dir=alternate-root Specifies an alternate directory tree to search for all the files used to put together the initrd image. This may be helpful for running pcinitrd after booting from an installation or rescue diskette. -r kernel-release, --release=kernel-release Specifies the kernel release number (i.e., 2.0.28) to use when looking for modules in /lib/modules. The default is the release of the running kernel. -s image-size, --size=image-size Specifies the filesystem size to create on the target file or device, in 1k blocks. The default is 2400. -u, --update Update mode: updates cardmgr and all the kernel modules in an existing initrd image, but does not modify other files. AUTHOR
David Hinds - dahinds@users.sourceforge.net SEE ALSO
pcmcia(5), cardmgr(8), lilo(8). pcmcia-cs $Date PCINITRD(8)
All times are GMT -4. The time now is 11:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy