07-17-2012
What do you want to do with it? Output just the datim, or check for lines that contain a specified date?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have this files:
./frm/lf_mt1_cd.Ic_cell_template.attr
./die/addgen_tb_pumd.Ic_cell_template.attr
./min_m1_n.Ic_cell_template.attr
When I use:
awk -F\/ '{print NF}'
Would result to:
3
3
2
I would like to list the files with 3 fields on it. Any Suggestions? (1 Reply)
Discussion started by: jehrome_rando
1 Replies
2. Shell Programming and Scripting
Hi!
How can I print out a specific range of rows, like "cat file | awk NR==5,NR==9", but in the END-statement?
I have a small awk-script that finds specific rows in a file and saves the line number in an array, like this:
awk '
BEGIN { count=0}
/ZZZZ/ {
list=NR
... (10 Replies)
Discussion started by: Bugenhagen
10 Replies
3. Shell Programming and Scripting
Hi, I am n00b to shell scripting and I am learning Ksh, sed and awk. I have a requirement and need your help.
1) How to read a specific section of a file. I have a file and I want to read the contents between say "Page Number:1" to "End of Page 1"
2) Within the section of the file that was... (2 Replies)
Discussion started by: kn.naresh
2 Replies
4. Shell Programming and Scripting
I have searched the forum for this - forgive me if I missed a previous post.
I have the following file:
blah blah blah
blah blah blah
blah blah blah
blah blah blah
blah blah blah
alter table "informix".esc_acct add constraint (foreign key (fi_id)
references "informix".fi ... (5 Replies)
Discussion started by: Shoeless_Mike
5 Replies
5. Shell Programming and Scripting
Hello friends,
I searched in forums for similar threads but what I want is to have a single awk code to perform followings;
I have a big log file going like this;
...
7450494 1724465 -47 003A98B710C0
7450492 1724461 -69 003A98B710C0
7450488 1724459 001DA1915B70 trafo_14:3
7450482... (5 Replies)
Discussion started by: enes71
5 Replies
6. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
7. Shell Programming and Scripting
Hello,
I have to a add 2 lines to /etc/sudoers file under this section below, can someone please suggest script to add these two lines when execute this remotely on to a multiple servers.
before
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
After
## Allow root... (2 Replies)
Discussion started by: bobby320
2 Replies
8. Shell Programming and Scripting
Hi there,
I have a script that I've used to find errors in my Minecraft Server logs. But I'd like to refine that script to be more useful.
Here is the script:
grep -n "SEVERE" /minecraft/server.log | awk -F":" '{print $1-2 "," $1+10 "p"}' | xargs -t -i sed -n {} /minecraft/server.log >>... (15 Replies)
Discussion started by: nbsparks
15 Replies
9. Shell Programming and Scripting
In the awk I have a very large tab-delimeted file that I am trying to extract the DP= value put it in $16 and add
specific text to $16 with . (dot) in $11-$15 and $18. Only the lines (there are several) that have the formating below in file
will have an empty $16. Other lines will be in a... (6 Replies)
Discussion started by: cmccabe
6 Replies
pwget(1) General Commands Manual pwget(1)
NAME
pwget, grget - get password and group information
SYNOPSIS
name | uid]
name | gid]
DESCRIPTION
and locate and display information from and
The standard output of contains lines of colon-separated password information whose format is the same as that used in the file (see
passwd(4)).
The standard output of contains lines of colon-separated group information whose format is the same as that used in the file (see
group(4)).
With no options, and get all entries with or respectively, (see getpwent(3C) and getgrent(3C)), and output a line for each entry found.
Options
When an option is given, only a single entry is printed.
The options for are:
Output the first entry that matches
name using (see getpwent(3C)).
Output the first entry that matches
uid using (see getpwent(3C)).
The options for are:
Output the first entry that matches
name using (see getgrent(3C)).
Output the first entry that matches
gid using (see getgrent(3C)).
NETWORKING FEATURES
NFS
If Network Information System (NIS) is in use, these commands provide password and group information based on the NIS version of the pass-
word and group databases in addition to the local password and group files.
RETURN VALUE
These commands return upon success, when a specific search fails, and upon error.
DEPENDENCIES
NFS:
WARNING: If the Network Information System network database is in use and the NIS client daemon is not bound to a NIS server daemon (see
ypserv(1M)), these utilities will wait until such a binding is established. These commands can be terminated in this condition by sending
a signal to the process (see kill(1)).
See ypmatch(1), and ypserv(1M).
AUTHOR
and were developed by HP.
FILES
local group data file
local password data file
SEE ALSO
getgrent(3C), getpwent(3C), group(4), passwd(4).
pwget(1)