Sponsored Content
Top Forums Shell Programming and Scripting Help with ... Formating the file using awk Post 303018071 by manas_ranjan on Monday 28th of May 2018 11:25:30 AM
Old 05-28-2018
Thanks RudiC. I tried this to count the columns but just couldn't relate how to combine multiple columns/rows at one.

Code:
awk -F"[ :\t]+" 'NR > 2 {A[$1]++}END{for(i in A)print i,A[i]}'

Nope I can't modify or influence the input data
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help required on file formating

I have two files file1 and file2 as shown below: file1: name nameabc bcd nameabcdefg file2: age age1111 age2345 age6743 I have pasted one file on the other with the delimiter "|" and the resulttant file is: name|age nameabc|age1111 bcd|age2345 nameabcdefg|age6743 (1 Reply)
Discussion started by: udiptya
1 Replies

2. Shell Programming and Scripting

AWK: formating number without printf

Hello, I wrote a script that does lot of things, and I would like to change the format of a number but without printing it now (so I don't want to use printf as it will print the value immediately). Schematically here is what I have: awk 'BEGIN{number=0.01234567} $1==$2{$3=number}... (5 Replies)
Discussion started by: jolecanard
5 Replies

3. Shell Programming and Scripting

file formating in Perl

Hi, I am new to unix , I have a requirement for formating the input file and generate the output file as per the downstream requirement .. My application receiving a text input file having 4 field and my application need to check each field and if some value of a field is blank ..then it need... (1 Reply)
Discussion started by: julirani
1 Replies

4. UNIX for Dummies Questions & Answers

File formating help needed.

I have a file called vm.cfg . content of file. acpi = 1 apic = 1 builder = 'hvm' How would i write a script which will add boot = 'd' at 3rd line. For example. after running the script the file should be like below. acpi = 1 apic = 1 boot = 'd' builder = 'hvm' I dont want to... (3 Replies)
Discussion started by: pinga123
3 Replies

5. Shell Programming and Scripting

Help in formating a txt file

Pls help in formatting a txt file using shell scripting Input file format: Name priya 2010-09-21 10:43:49 TEXT ID 1 hi TEXT ID 2 how TEXT ID 3 r TEXT ID 4 u Output required: name priya hi how r u (4 Replies)
Discussion started by: bha148
4 Replies

6. Shell Programming and Scripting

formating sql file using awk or sed

Hi, I have a file where I would like to add a prompt type object_name statement before every create commnad create or replace force view test_view_01 ( col1 col2 col3 ) as (select a,b,c from sometable ); create or replace view test_view_02 ( col4 col5 col6 ) as (5 Replies)
Discussion started by: jville
5 Replies

7. UNIX for Beginners Questions & Answers

File formating with lines

Hi All, Need to modify a file basically join the extra line to one I am having a file like below And would like to make it as below . (4 Replies)
Discussion started by: arunkumar_mca
4 Replies

8. UNIX for Beginners Questions & Answers

File formating help

Hi all, I am having the file below I need that as below Thanks, Arun (12 Replies)
Discussion started by: arunkumar_mca
12 Replies

9. Shell Programming and Scripting

File formating

I need to create a fixed width file based on the column lengths. lets assume I have six(this may be dynamic) fields each are of different length column1=6 #size of the column column2=3 column3=2 column4=3 column5=4 column6=5 I tried below code snippet but it is not working echo... (4 Replies)
Discussion started by: gvkumar25
4 Replies

10. UNIX for Beginners Questions & Answers

awk HTML Conditional Formating

I am receiving the below output in text format. The output is converted to HTML table using the code mentioned below output in text LogDate DayOfWeek/Hours _0_ _1_ _2_ _3_ _4_ _5_ _6_ _7_ _8_ _9_ _10_ _11_ _12_ _13_ _14_ _15_ _16_ ... (3 Replies)
Discussion started by: Dumpi16
3 Replies
bsmconv(1M)                                               System Administration Commands                                               bsmconv(1M)

NAME
bsmconv, bsmunconv - enable or disable the Basic Security Module (BSM) on Solaris SYNOPSIS
/etc/security/bsmconv [rootdir...] /etc/security/bsmunconv [rootdir...] DESCRIPTION
The bsmconv and bsmunconv scripts are used to enable or disable the BSM features on a Solaris system. The optional argument rootdir is a list of one or more root directories of diskless clients that have already been configured. See smdiskless(1M). To enable or disable BSM on a diskless client, a server, or a stand-alone system, logon as super-user to the system being converted and use the bsmconv or bsmunconv commands without any options. To enable or disable BSM on a diskless client from that client's server, logon to the server as super-user and use bsmconv, specifying the root directory of each diskless client you wish to affect. For example, the command: myhost# bsmconv /export/root/client1 /export/root/client2 enables BSM on the two machines named client1 and client2. While the command: myhost# bsmconv enables BSM only on the machine called myhost. It is no longer necessary to enable BSM on both the server and its diskless clients. After running bsmconv the system can be configured by editing the files in /etc/security. Each diskless client has its own copy of configu- ration files in its root directory. You might want to edit these files before rebooting each client. Following the completion of either script, the affected system(s) should be rebooted to allow the auditing subsystem to come up properly initialized. FILES
The following files are created by bsmconv: /etc/security/device_maps Administrative file defining the mapping of device special files to allocatable device names. /etc/security/device_allocate Administrative file defining parameters for device allocation. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsr | +-----------------------------+-----------------------------+ SEE ALSO
auditconfig(1M), auditd(1M), audit_startup(1M), audit.log(4), audit_control(4), attributes(5) NOTES
bsmconv and bsmunconv are not valid in a non-global zone. SunOS 5.10 26 May 2004 bsmconv(1M)
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy