02-15-2010
anbu23, Thanks so much. It worked perfectly. The problem was PEBCAC.
---------- Post updated at 01:12 PM ---------- Previous update was at 01:10 PM ----------
kcoder24. I just saw your response. Thanks also for responding. But it looks like I'm good now. You guys are great!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Greetings to all,
I would like to read input from a file and make duplications from it with Linux shell.
For e.g.
Input file
-----------
ABC
ABB
ABA
-------------------------------
Output file
------------
ABC
ABC
ABC
ABB
ABB (6 Replies)
Discussion started by: noelcantona
6 Replies
2. Shell Programming and Scripting
hello. i want to make an awk script to search an html file and output all the links (e.g .html, .htm, .jpg, .doc, .pdf, etc..) inside it. also, i want the links that will be output to be split into 3 groups (separated by an empty line), the first group with links to other webpages (.html .htm etc),... (8 Replies)
Discussion started by: kyris
8 Replies
3. Shell Programming and Scripting
I have a list of words that I want to grep in many files to see which ones have it and which ones dont.
in the text file I have all the words listed line by line, ex:
list.txt:
check
try this
word1
word2
open space
list ..
I want to grep each line one by one.
like I want it to... (7 Replies)
Discussion started by: s3rro
7 Replies
4. Shell Programming and Scripting
Hi,
I have two files with the format shown below. I need to read first field(value before comma) from file 1 and search for a record in file 2 that has the same value in the field "KEY=" and write the complete record of file 2 with corresponding field 2 of the first file in to result file.
... (11 Replies)
Discussion started by: King Kalyan
11 Replies
5. Shell Programming and Scripting
Hi,
I have a folder which contains multiple config.xml files and one input file, Please see the below format.
Config Files format looks like :-
Code:
<application name="SAMPLE-ARCHIVE">
<NVPairs name="Global Variables">
<NameValuePair>
... (0 Replies)
Discussion started by: haiksuresh
0 Replies
6. Shell Programming and Scripting
Hi All
I have written the following script:
#!/bin/ksh
while read cmdline
do
echo `$cmdline`
pid="$cmdline"
done<commands.txt
===========
commands.txt contains:
ps -ef | grep abc | grep xyz |awk '{print $2};
My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies
7. Shell Programming and Scripting
Hi,
I am new to shell scripting and is working on a script to extract lines from a log file between two time stamps using awk command. After some research I used following command:
awk '/01 Oct 2011/{p=1} /10 Oct 2011/{p=0} p' test.log >> tmp.log
This works fine. But now i want to... (3 Replies)
Discussion started by: davidtd
3 Replies
8. Shell Programming and Scripting
Dear all,
I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script.
Any help is greatly appreciated.
Greetings,
emily
DATA.txt (snippet of the huge text file)
407202849... (2 Replies)
Discussion started by: emily
2 Replies
9. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone,
I am new to Unix and trying to learn as much as I can. But I do not need to create urgent scripts that I can use instantly. :(:(
One of the scripts I am trying to write is essentially something that takes in a .txt file with product names.
The product names are... (3 Replies)
Discussion started by: UN007
3 Replies
LEARN ABOUT DEBIAN
dump-acct
DUMP-ACCT(8) GNU Accounting Utilities DUMP-ACCT(8)
NAME
dump-acct - print an acct file in human-readable format.
SYNOPSIS
dump-acct [-r|--reverse] [-R|--raw] [--format] version] [--byteswap] [--ahz] hertz] [-n|--num recs] [-h|--help] [ files]
DESCRIPTION
dump-acct filename prints a list of all executed processes. This list is written by the kernel which must be compiled with BSD process
accounting enabled (Debian kernel image have it already enabled). It must be started with accton(5). Note that on Debian systems, this is
ensured via the init script /etc/init.d/acct.
All fields are separated by vertical line. Fields are: command, version, user time, system time, effective time, uid, gid, memory, io, pid,
ppid, time. User, system and effective times are ticks per second. One tick is usually 1/50 of a second. The time field shows the start
time of the process.
The --raw switch, as well as the --format, --byteswap, and --ahz can be used as a handy format converter.
OPTIONS
-h, --help
Prints the usage string and default locations of system files to standard output and exits.
-n, --num recs
Number of lines to print.
-r, --reverse
Start printing from last records.
-R, --raw
Print raw records, not human-readable.
--format version
Use specified format version to display records.
--byteswap
Swap bytes endianness when reading records.
--ahz Use specified units of time to display data from other kernel versions and architectures.
FILES
acct The system wide process accounting file. See acct(5) for further details.
SEE ALSO
acct(5), ac(8).
AUTHOR
The GNU accounting utilities were written by Noel Cragg <noel@gnu.ai.mit.edu>.
This manual page was written by Ognyan Kulev <ogi@fmi.uni-sofia.bg> and updated by Daniel Baumann <daniel@debian.org> and Mathieu Trudel
<mathieu.tl@gmail.com> for the Debian project (but may be used by others).
6.4pre1 2006-04-22 DUMP-ACCT(8)