12-09-2008
help to make list of files and run script..
Hey,
I have finally made a command that works and now has to run it on 200+ files to run it on.
How do I do that?
Just fyi and if it complicates anything my commandline is:
awk '{if ($1 ~ /1/) print $2}' file
(yup, is should print $2 if $1 is a certain value)
It doesn't work when I:
ls *_pattern_files | awk '{if ($1 ~ /1/) print $2}' file > results.file
and can I pop all the results into the same file? And see if it already exists in the results file and then don't pop it? (else since I'm a dummy I can sort it manually if it's not straight forward).
What is it that I do wrong?
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
One of our servers runs Solaris 8 and does not have "ls -lh" as a valid command. I wrote the following script to make the ls output easier to read and emulate "ls -lh" functionality. The script works, but it is slow when executed on a directory that contains a large number of files. Can anyone make... (10 Replies)
Discussion started by: shew01
10 Replies
2. Shell Programming and Scripting
Hi folks
I have a unix script script1 in a directory folder1 and also I have few input log files in this directory. My input log files will be copied into this directory folder1 from the portable thumb drive.
Now what I want is I need to run this script1 whenever any new file is copied... (2 Replies)
Discussion started by: ks_reddy
2 Replies
3. Shell Programming and Scripting
Hi all,
I want to monitoring my interface every 6 hours where i want to run snoop command to capture all packet through the interface, so i want running snoop then snoop will run for 5 minutes after that snoop stop then will start again after 6 hours than run for 5 minutes again.
thereis any... (9 Replies)
Discussion started by: tindasz
9 Replies
4. Shell Programming and Scripting
Good morning. I am searching for "how-to"'s for some particular questions:
1. How to write a script in HP-UX 11.
2. How to schedule a script.
3. How to "call" scripts from the original script.
4. How to su to another user from within a script.
This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies
5. Shell Programming and Scripting
Hi,shell script is scheduled from maestro and we want mastero should not run shell script so can we edit the shell script so that it should run.ThanksPrakash (5 Replies)
Discussion started by: prakashdba2010
5 Replies
6. Shell Programming and Scripting
Hello,
Is there any method thorugh which script can take argument if pass otherwise if argument doesn't pass then it takes the argument from the configuration file
i.e I am workiing on a script which will run through crontab and the script will
chekout the code ,zip and copy to the... (3 Replies)
Discussion started by: rohit22hamirpur
3 Replies
7. Shell Programming and Scripting
how to run an already developed script run against a list of ip addresses solaris 8 question.
the script goes away and check traffic information, for example
check_GE-VLANStats-P3 1.1.1.1
and returns the results ok.
how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies
8. Shell Programming and Scripting
I have this little bash script I use to transcode mkv files using handbrake.
#!/bin/bash
sourcedir="/media/raid10/video/to_be_encoded_series"
destdir="/media/raid10/video/series"
cd "$sourcedir"
for i in *.mkv; do
HandBrakeCLI -i "$i" -o "$destdir/${i%.*}.mkv" -e x264 -q 20.0 -E copy -B... (4 Replies)
Discussion started by: barrydocks
4 Replies
9. Shell Programming and Scripting
Say i have a simple example:
root@server # cat /root/scripts/test.sh
while sleep 5
do
echo "how are u mate" >> /root/scripts/test.log
done
root@server #
Instead of using rc.local to start or another script to check status, I would like make it as daemon, where i can do the following:
... (2 Replies)
Discussion started by: timmywong
2 Replies
10. UNIX for Dummies Questions & Answers
Hello, my name is Spurkle. I'm new to linux stuff.
Currently I am trying to make a script which will run three other scripts in screen.
This is the code:
sudo screen -S hubServ /var/servers/hub/hub.sh
sudo screen -S facServh /var/servers/factions/factions.sh
sudo screen -S bunServ... (5 Replies)
Discussion started by: Spurkle
5 Replies
LEARN ABOUT REDHAT
namazu
NAMAZU(1) Namazu Project NAMAZU(1)
NAME
namazu - a search program of Namazu
SYNOPSIS
namazu [options] <query> [index]...
DESCRIPTION
namazu 2.0.9, a search program of Namazu.
-n, --max=NUM
set number of documents shown to NUM.
-w, --whence=NUM
set first number of documents shown to NUM.
-l, --list
print results by listing format.
-s, --short
print results by short format.
--result=EXT
set NMZ.result.EXT for printing results.
--late sort documents in late order.
--early
sort documents in early order.
--sort=METHOD
set a sort METHOD (score, date, field:name)
--ascending
sort in ascending order (default: descending)
-a, --all
print all results.
-c, --count
print only number of hits.
-h, --html
print in HTML format.
-r, --no-references
do not display reference hit counts.
-H, --page
print further result links. (nearly meaningless)
-F, --form
force to print <form> ... </form> region.
-R, --no-replace
do not replace URI string.
-U, --no-decode-uri
do not decode URI when printing in a plain format.
-o, --output=FILE
set the output file name to FILE.
-f, --config=FILE
set the config file name to FILE.
-C, --show-config
print current configuration.
-q, --quiet
do not display extra messages except search results.
-d, --debug
be debug mode.
-v, --version
show the version of namazu and exit.
--help show this help and exit
REPORTING BUGS
Report bugs to <bug-namazu@namazu.org>.
COPYRIGHT
Copyright (C) 1997-1999 Satoru Takabayashi All rights reserved.
Copyright (C) 2000,2001 Namazu Project All rights reserved.
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
namazu of Namazu 2.0.9 November 2001 NAMAZU(1)