09-24-2014
Hi,
Here the problem is some what changed and is more dependent on how you search the file, so it is difficult to take a stab at this without knowing that information.
Post what you have already tried.
Regards
Dave
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to write a ksh script that uses awk, but I want to pass variables to awk. For example (not working):
if ];then
searchstr=$1
lsof -i | awk '{if($9~/SEARCHSTR/) print $2} SEARCHSTR=$searchstr'
else
echo "usage: $0 <search string>"
fi
I tried several options. Is it... (3 Replies)
Discussion started by: rein
3 Replies
2. Shell Programming and Scripting
How do i get the value of the variable from the called script(script2) to the calling script(script1) in ksh ?
I've given portion of the script here to explain the problem.
Portion of Script 1
=============
-----
-----
tmp=`a.ksh p1 p2 p3`
if then
# error processing
fi
-----... (10 Replies)
Discussion started by: rajarkumar
10 Replies
3. Shell Programming and Scripting
Hi - Help needed.
I have an input file that looks something like this, but with a lot more entries:
A
Customer1
B
4500
C
8000
A
Customer2
B
6422
C
8922
I need to be able to print details for each customer on one line per customer.
ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies
4. Shell Programming and Scripting
Hi all,
I'm using awk in a .ksh script to split one file by line prefix into different files (up to 4). The files are named after the prefix in the line, and a sequence no.
Is there any way to get the filenames in to variables too? I need _ftpfile1, _ftpfile2, _ftpfile3 and _ftpfile4 which are... (2 Replies)
Discussion started by: spidermike
2 Replies
5. Shell Programming and Scripting
How do I assign values to reference variables?
I am assigning a variable name to --> $user_var
Then I am trying to change its underlying variable value by
$((user_var))=$user_value .. its failing,,
Please let me know if there is a way to do this dynamically..
FileA.props... (5 Replies)
Discussion started by: kchinnam
5 Replies
6. Shell Programming and Scripting
Hi Guys,
I have an issue with awk and variables. I have trawled the internet and forums but can't seem to get the exactt syntax I need.
I have tried using awk -v and all sorts of variations but I have hit a brick wall. I have spent a full day on this and am just going round in circles.
... (3 Replies)
Discussion started by: gazza-o
3 Replies
7. Shell Programming and Scripting
Using ksh to call a function which has awk script embedded.
It parses a long two element list file, filled with text numbers (I want column 2, beginning no sooner than line 45, that's the only known thing) . It's unknown where to start or end the data collection, dynamic variables will be used. ... (1 Reply)
Discussion started by: highnthemnts
1 Replies
8. Shell Programming and Scripting
Hi,
I have a script where I make a sqlplus connection. In the script I have multiple sql queries within that sqlplus connection. I want the result of the queries to be stored in shell variables declared earlier. I dont want to use procedures. Is there anyway else.
Thanks in advance..
Cheers (6 Replies)
Discussion started by: gonchusirsa
6 Replies
9. Shell Programming and Scripting
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies
10. Shell Programming and Scripting
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
LEARN ABOUT OPENDARWIN
mach-o
MACH-O(5) File Formats Manual MACH-O(5)
NAME
Mach-O - Mach-O assembler and link editor output
SYNOPSIS
#include <mach-o/loader.h>
#include <mach-o/nlist.h>
#include <mach-o/stab.h>
#include <mach-o/reloc.h>
DESCRIPTION
The object files produced by the assembler and link editor are in Mach-O (Mach object) file format. The file name a.out is the default
output file name of the assembler as(1) and the link editor ld(1) The format of the object file however is not 4.3BSD a.out format as the
name suggests, but rather Mach-O format. The link editor will make a.out executable if the resulting format is an executable type and
there were no errors and no unresolved external references.
The complete description of a Mach-O file is given in a number of include files. The file <mach-o/loader.h> describes the headers, <mach-
o/nlist.h> describes the symbol table entries with <mach-o/stab.h> supplementing it, and <mach-o/reloc.h> describes the relocation entries.
The actual instructions and data used by the program represented by a Mach-O file are the contents of its sections. Sections are grouped
together in segments. Each section carries with it, in its header, the information as to which segment it belongs in. When a file type
that is executable is created the sections are placed in their proper segment and all the segment headers are created and the segments
themselves are padded out to the segment alignment (typically the target pagesize). For the object file type produced by an assembler (or
by the link editor for further linking) all the sections are placed in one segment for compactness.
When the kernel executes a Mach-O file it maps in the object file's segments, the dynamic link editor (if used) and creates the thread(s)
for execution. Any part of the object file that is not part of a segment is not mapped in for execution. For executable using the dynamic
link editor the headers and other link edit information is needed to execute the file. These parts include the relocation entries, the
symbol table and the string table. These parts are mapped in with the use of the link editor's -seglinkedit option which creates a segment
that contains these parts. These parts can be stripped down with the -S option to ld(1) or various options to strip(1).
SEE ALSO
as(1), ld(1), nm(1), gdb(1), stab(5), strip(1)
Apple Computer, Inc. October 22, 2001 MACH-O(5)