awk script modification - treat certain files differently
the above scans all files in a given directory. prints the file name, number of lines in each file and number of lines found containing 'ERROR'.
im now trying to make it so that the script executes a command if any of the file it reads in isn't a regular file. i.e., if the file is a gzip file, then run a particular command.
the bolded is my attempt to include the gunzip command in there. unfortunately, i cannot "gunzip" all the files in the directory beforehand. this is because not all files in the directory will be "gzip" type. some will be regular files.
so i need the script to treat any .gz file it finds a different way so it can read it, count and print the number of lines that's in it, and the number of lines it found matching the pattern supplied (just as it would if the file had been a regular file).
I posted this in Shell scripting... maybe I'll try it in this forum..
*****************
I wrote a script to stop a process,truncate its log files and re-start the process...
We are using Progress Software in Unix ( Sun Sparc)
When ever I start this progress program , it should kick off a... (1 Reply)
Hello ,
I want to segregate by file contents in a much simpler format ie input file
Wednesday May 16 11:59:44 IST 2007
90376 44136 process1 pid1
90200 43208 process1 pid2
90200 43208 process1 pid3
90200 43208 process1 pid4
Wednesday May 16 12:00:45 IST 2007
90376 44136 process1 pid1... (1 Reply)
I need a script that reads the out put of a command (softwareupdate --list) and will tally up the number of asterisks in the output and tell me how many there were. How do I go about getting my script to treat asterisks as a regular character and not a wildcard or some other operator? (8 Replies)
Hi,
I have an awk script which performs simple operations of variable assignments and finally printing the variables in custom form.
BEGIN {FS=OFS="\n"}
{
v1=substr($0,1,15)
v2=substr($0,16,200)
v3=substr($0,216,20)
print v1 "|" v2 "|" v3
}
The input file being processed... (2 Replies)
Hi everyone!
first of all thank you all for the forum.
My question is, is there a bash or java program, which addresses the existing text in the html that is visible in the web page for editing by another string, eg
name1: flakjsdlñfjas
Name of father: fdfjaksdfjskdfsd
Well it... (1 Reply)
I want the below script to omit every chunk of data that contains a specific hostname.
here's the scenario. i have a configuration file that contains the configuration of several hosts. a sample of this configuration file is this:
define host {
address ... (12 Replies)
Hi Gurus,
I hit a hard block in my script.
when using awk command with variable, I got different result.
Please see below:
my test file as below:
$ cat demofile.txt
filename-yyyy-abcd
filename-xxx-week-pass
filename-xxx-week-run
for testing purpose, I put 3 awk command in one script.... (7 Replies)
Hi, awk seem to be acting differently in Unix and Linux when it comes to formatting. This is making it difficult to migrate scripts.
for example:
UNIX:
echo "123" |awk '{printf ("%05s\n" ,$1)}'
00123
echo "123" |awk '{printf ("%05d\n" ,$1)}'
00123
echo "S12" |awk '{printf ("%05s\n"... (9 Replies)
Discussion started by: wanderingmind16
9 Replies
LEARN ABOUT DEBIAN
gnunet-dht-get
GNUNET-DHT-GET(1) General Commands Manual GNUNET-DHT-GET(1)NAME
gnunet-dht-get - issue a GET request to the GNUnet DHT, prints results.
SYNOPSIS
gnunet-dht-get [options]
DESCRIPTION
gnunet-dht-get issue a GET request to the GNUnet DHT and prints results.
OPTIONS -c FILENAME, --config=FILENAME
Use the configuration file FILENAME.
-h, --help
Print short help on options.
-k KEY, --key=KEY
The query key.
-L LOGLEVEL, --loglevel=LOGLEVEL
Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR.
-l LOGFILE, --logfile=LOGFILE
Configure logging to write logs to LOGFILE.
-r LEVEL, --replication=LEVEL
How many parallel requests (replicas) to create.
-T TIMEOUT, --timeout=TIMEOUT
How long to execute this query before giving up?
-t TYPE, --type=TYPE
The type of data to look for.
-V, --verbose
Be verbose (print progress information).
-v, --version
Print GNUnet version number.
BUGS
Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending electronic mail to <gnunet-developers@gnu.org>
GNUnet Jan 4, 2012 GNUNET-DHT-GET(1)