09-12-2019
is there a way to add an option for dynamic input
let's say I want to check for today's date or let's say I need to check for a word or let's say I need to check the number of lines
The thing is ask is dynamic so any input can be taken and applied to the search
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello everybody !
GOT SOMETHING INTERESTING...
I am trying to retain line number for a text document.. usually we get line numbers in VI using :set nu , but I want to permanently store them. It's a 4000 lines of text and I want grep/search it for a list of words/fields stored in a different... (2 Replies)
Discussion started by: sdlayeeq
2 Replies
2. Shell Programming and Scripting
cat dailyreports | grep "Important list" | awk -F":" '{print $2}' | awk -F" " '{print $1}'
hey guys, after running the above combination of cat and awk, i get the below output:
3
4
2
9
now, i need to add these numbers up all in one line. i dont know what to add to that cat and awk one... (2 Replies)
Discussion started by: Terrible
2 Replies
3. Shell Programming and Scripting
Hello,
I am too daft to remember how to properly feed numbers that I've extracted with awk(1) to tail(1).
The actual question is probably a lot more simple than the context, but let me give you the context anyway:
I've just received some email that was sent with MS Outlook and arrived in... (8 Replies)
Discussion started by: ropers
8 Replies
4. Shell Programming and Scripting
Hi,
I am writing a shell script that checks catalina logs on a production system and mails me if it detects errors.
It greps the logs for known errors which i have defined as variables.
The problem is the logs are huge, approx 30,000 before they rotate.
So I am forced to use grep instead... (3 Replies)
Discussion started by: Moxy
3 Replies
5. Shell Programming and Scripting
Hi,
I have a script which basically watches a log file for new lines using tail, then takes action based on what is logged. I wrote a script to do this for me and its working great, my only problem is that once per week, this log file is archived to another directory, and a new log is created.... (4 Replies)
Discussion started by: lstorm2003
4 Replies
6. Shell Programming and Scripting
Hello All,
I have 3 types of files. The names of which starts with P,I,M
like P*********
D*********
M*********
now I need to do some operations witht hese files..
so
if file name starts with P or p
then
do the operation for P file...
fi
else (20 Replies)
Discussion started by: smarty86
20 Replies
7. Shell Programming and Scripting
file A
E969K
D223L
E400L
E34L
file B
predicted 3
1 250
251 500
501 1000
The output should be
E969K 501 1000
D223L 1 250
E400L 251 500
E34L 1 250
I tried in this way (1 Reply)
Discussion started by: cdfd123
1 Replies
8. Shell Programming and Scripting
Trying to use code that I found to send only new lines out of a log file by doing:
while :; do
temp=$(tail -1 logfile.out)
awk "/$last/{p=1}p" logfile.out #pipe this to log analyzer program
last="$temp"
sleep 10
done
Script works fine when logfile is basic text, but when it contains... (2 Replies)
Discussion started by: moo72moo
2 Replies
9. Shell Programming and Scripting
Hello,
How to tail -f multi logfile from multi path in 1 shell script.
File & Path
/usr/home/localmode/mode110l/log/logic/number110/digit110_digit110m4_2013050210.txt
/usr/home/localmode/mode103l/log/logic/number103/digit103_digit103m4_2013050210.txt... (4 Replies)
Discussion started by: ooilinlove
4 Replies
10. Shell Programming and Scripting
Hi all;
Here is my file:
V1.3=4
V1.4=5
V1.1=3
V1.2=6
V1.3=6
Please, can you help me to write a script shell that counts the sum of values in my file (4+5+3+6+6) ?
Thank you so much for help.
Kind regards. (3 Replies)
Discussion started by: chercheur111
3 Replies
LEARN ABOUT OSX
redo_prebinding
REDO_PREBINDING(1) General Commands Manual REDO_PREBINDING(1)
NAME
redo_prebinding - redo the prebinding of an executable or dynamic library
SYNOPSIS
redo_prebinding [-c | -p | -d] [-i] [-z] [-u] [-r rootdir] [-e executable_path] [-seg_addr_table table_file_name] [-seg_addr_table_filename
pathname] [-seg1addr address] [-o output_file] [-s] input_file
DESCRIPTION
Redo_prebinding is used to redo the prebinding of an executable or dynamic library when one of the dependent dynamic libraries changes.
The input file, executable or dynamic library, must have initially been prebound for this program to redo the prebinding. Also all
depended libraries must have their prebinding up to date. So when redoing the prebinding for libraries they must be done in dependency
order. Also when building executables or dynamic libraries that are to be prebound (with the -prebind options to ld(1) or libtool(1)) the
dependent libraries must have their prebinding up to date or the result will not be prebound.
The options allow for different types of checking for use in shell scripts. Only one of -c, -p or -d can be used at a time. If redo_pre-
binding redoes the prebinding on an input file it will run /usr/bin/objcunique if it exists on the result.
OPTIONS
-c only check if the file needs to have it's prebinding redone and return status. A 0 exit means the file's prebinding is up to date,
1 means it needs to be redone and 2 means it could not be checked for reasons like a dependent library is missing (an error message
is printed in these cases).
-p check only for prebound files and return status. An exit status of 1 means the file is a Mach-O that could have been prebound and
is not otherwise the exit status is 0.
-d check only for dynamic shared library files and return status. An exit status of 0 means the file is a dynamic shared library, 1
means the file is not, 2 means there is some mix in the architectures.
-i ignore non-prebound files (useful when running on all types of files).
-z zero out the prebind check sum in the output if it has one.
-u unprebind, rather than reprebind (-c, -p, -d, -e ignored). Resets or removes prebinding-specific information from the input file.
As unprebinding is intended to produce a canonical Mach-O binary, bundles and non-prebound executables and dylibs are acceptable as
input. For these files, the unprebind operation will zero library time stamps and version numbers and zero entries in the two-
level hints table.
-e executable_path
replace any dependent library's "@executable_path" prefix with the executable_path argument.
-seg_addr_table table_file_name
The -seg_addr_table option is used when the input a dynamic library and if specified the table entry for the install_name of the
dynamic library is used for checking and the address to relocate the library to as it prefered address.
-seg_addr_table_filename pathname
Use pathname instead of the install name of the library for matching an entry in the segment address table.
-seg1addr address
Move the input library to base address address. This option does not apply when -u, -seg_addr_table or -seg_addr_table_filename are
specified.
-r rootdir
prepend the rootdir argument to all dependent libraries.
-o output_file
write the updated file into output_file rather than back into the input file.
-s write the updated file to standard output
DIAGNOSTICS
With no -c, -p or -d an exit status of 0 means success and 2 means it could not be done for reasons like a dependent library is missing (an
error message is printed in these cases). And exit of 3 is for the specific case when the dependent libraries are out of date with respect
to each other.
Apple Computer, Inc. March 29, 2004 REDO_PREBINDING(1)