Using awk multiple times in a shell loops leads to the question "why shell at all"? Try also
Code:
awk '{NM = $2; $1 = $2 = $3 = $4 = ""; printf "%-15s\t%s\n", NM, $0}' file
Name Description
accountsservice query and manipulate user account information
acl Access control list utilities
acpid Advanced Configuration and Power Interface event daemon
adduser add and remove users and groups
amd64-microcode Processor microcode firmware for AMD CPUs
apparmor user-space parser utility for AppArmor
apport automatically generate crash reports for debugging
apport-symptoms symptom scripts for apport
guys forget the find command coz with find command u can't get condational output like grep. I will give small example :-
Apr 10 09:12 aacbl222_12aug1998.lqc
Apr 10 09:12 sscbl4534_4sep2001.lqc
Apr 10 09:12 ah66fmi_5jan1997.lqc
Apr 10 09:12 y313h1_7sep1998.lqc
May 11 09:12... (5 Replies)
Hi,
I'm trying to print every line from first field to the fourth from a file containing more.
$ cat input
a b c d e f g
a b c d e f gI'm trying
awk '{for (i=1; i <= NF-3; i++) print $i}' awkTest.datbut it printsa
b
c
d
a
b
c
dSo, I easily guess I'm wrong. :)
Of course, I want:a b... (5 Replies)
Hi,
I have below text file
01.02.2014,asdas,arse,aere,4tfsd
12.03.2014,sdte,45gf,8iuj,qw343w
01.02.0214,aetre,sdfgter,asfrwe
I have writen below code to print only first field that is only date field from text file
#!/bin/ksh
echo "enter week"
read week
while read -r... (6 Replies)
I want to print line by line only the first field from txt file
input file
etr,t7tu,e45xdt,e45exgt,cdgfe
aqw34aw,45edgf,45estd,sert34
a232e,4etedf,w345er,qw345rw,
qw354,q34asf,tw45f,q3drsf
required o/p file
etr
aqw34aw
a232e
qw354 (1 Reply)
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
LEARN ABOUT SUSE
dupdb-admin
dupdp-admin(1) General Commands Manual dupdp-admin(1)NAME
dupdb-admin - Manage the duplicate database for apport-retrace.
SYNOPSIS
dupdb-admin -f dbpath status
dupdb-admin -f dbpath dump
dupdb-admin -f dbpath changeid oldid newid
DESCRIPTION apport-retrace(1) has the capability of checking for duplicate bugs (amonst other things). It uses an SQLite database for keeping track of
master bugs. dupdb-admin is a small tool to manage that database.
The central concept in that database is a "crash signature", a string that uniquely identifies a particular crash. It is built from the
executable path name, the signal number or exception name, and the topmost functions of the stack trace.
The database maps crash signatures to the 'master' crash id and thus can close duplicate crash reports with a reference to that master ID.
It also tracks the status of crashes (open/fixed in a particular version) to be able to identify regressions.
MODES
status Print general status of the duplicate db. For now, it only shows the time when the database was "consolidated" last, i. e. when the
bug states (open/fixed) in the SQLite database where updated to the actual states in the bug tracking system.
dump Print a list of all database entries.
changeid
Change the associated crash ID for a particular crash.
OPTIONS -f path, --database-file=path
Instead of processing the new crash reports in /var/crash/, report a particular report in an arbitrary file location. This is use-
ful for copying a crash report to a machine with internet connection and reporting it from there. This defaults to ~./apport_dupli-
cates.db.
AUTHOR
apport and the accompanying tools are developed by Martin Pitt <martin.pitt@ubuntu.com>.
Martin Pitt August 01, 2007 dupdp-admin(1)