10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am using the below code for printing the column position of a particular string
nawk -v srch="DName" -F '\t' '{for(j=1; j<=NF; j++) { if($j==srch) print j } exit }' input_file.txt
The above code prints the column position of the input string DName (that is 1)
Now the problem is,... (7 Replies)
Discussion started by: sampoorna
7 Replies
2. Shell Programming and Scripting
I have write a script which contains
ssh -p 12345 dcplatform@10.125.42.50
ssh 127.0.0.1 -p 5555 "$CMD"
ssh root@$GUEST_IP "$CMD"
before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position"
I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a string like the following:
/db1/data/GLIDER/SYSTEM.dbf
need to find the postion where "SYSTEM.dbf" starts, so I tried:
LOCATION=/db1/data/GLIDER/SYSTEM.dbf
$ expr index $LOCATION SYSTEM
expr: syntax error
$ expr index "$LOCATION" SYSTEM
expr: syntax error
... (5 Replies)
Discussion started by: seafan
5 Replies
4. Shell Programming and Scripting
Hi Friends thanks a lot....for ur replies its worked fine...i have one more question..
if i need to remove trailor (T000000004 ) as shown below file also with header.Plz help thanks
Source file:
H20100928
D04041201609360677PC790010384I
D04041203326357853PC790010645R ... (1 Reply)
Discussion started by: dprakash
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have a input file :::
1583904589034853904
1690234849023849023
159823890238409
1690238490238490238490
.
.
.
The output file should have the record 16 appended to the record 15 and a variable should be added at a FIXED POSTION at 55.
The records are been processed inside a loop... (3 Replies)
Discussion started by: akashhello
3 Replies
6. Shell Programming and Scripting
I have a file like this..
Maharastra Mumbai worli
Maharastra Mumbai navy
maharatra Pune
Maharastra Nagpur
Karnataka Bangalore
Karnataka Mysore
Karnataka Mangalore
Punjab Amritsar
punjab Jalandar
my expected outcome should be like this
Maharastra Mumbai worli
---------- ... (9 Replies)
Discussion started by: geeko
9 Replies
7. Shell Programming and Scripting
In VI editor ctrl + g is used indicate the line number on which the cursor is placed...similarly is there a way to determine the column number of the cursor position..? (1 Reply)
Discussion started by: vijay_0209
1 Replies
8. Shell Programming and Scripting
Hi there,
I have progress bars in several of my scripts, they work by deleting what has already been writen out, using:
clear = "\\010"*( length of string i want to delete )
clearCmd = "echo -ne \""+clear+"\""
os.system(clearCmd)
I then re-write the percent done & the progress... (4 Replies)
Discussion started by: purest
4 Replies
9. UNIX for Dummies Questions & Answers
All,
I need to grep for a value between particular positions:
Eg:
ACME CORPORATION 3 213.89
I need to look out for the value 3 betwen postions 20 and 26.
Any ideas.
Thanks
KP. (3 Replies)
Discussion started by: kingofprussia
3 Replies
10. UNIX for Dummies Questions & Answers
Hi there,
Is there a way to position the cursor at EOF in vi, I know from the man pages how to position the cursor at the end of a paragraph, but what about the EOF (End Of File).
Regards (6 Replies)
Discussion started by: JimJim
6 Replies
portal(5) File Formats Manual portal(5)
NAME
portal - a "window to the future" for applications
SYNOPSIS
DESCRIPTION
This header file is a "window to the future" for applications. It will help you to:
o Write code that is portable across 32-bit and 64-bit systems,
o Avoid undocumented assumptions about sizes of integral types,
o Write portable code that needs to be explicit about the sizes of integral types,
o Write code that is portable to a platform which has different sizes of integral types, and
o Share frequently used macros that are portable across 32-bit and 64-bit systems.
In addition to the macros defined in this file, it includes the header files (see limits(5)) and (see inttypes(5)).
The following macros are defined in
This macro can be used to create a mask that has one bit set.
bit_num is the position of the bit to set, and type is the data type of the mask. A -1 is returned in the case of overflow or
underflow.
This macro can be used to set a bit in a mask.
mask is the current value of the mask, bit_num is the position of the bit to set, and type is the data type of the mask.
This macro can be used to return the bit position
of the sign bit for the specified data type. type is the data type for which to return the position of the sign bit.
This macro can be used to return a mask for the sign bit for
the specified data type. type is the data type for which to return the sign bit mask.
This macro can be used to do a sign extension from one
data type to another. value is the current value that is to be sign-extended. old_type is the current data type of value and
new_type is the new data type of value.
This macro can be used to check if code has been
compiled big or little endian. endian is an integer in which the result will be returned.
The following macros can be used for print formatting and scan formatting of values of data types that can change in size based upon the
compilation flag Examples of such data types are off_t and fpos_t.
EXAMPLES
The macro in the following example will turn on the high bit in a 64-bit integer.
The macro in the following example will be used to turn on all bits except the sign bit in a 32-bit integer.
The macro in the following example will turn on the three least significant bits of the maximum integer.
The macro in the following example will return the position of the sign bit in a 32-bit integer.
The macro in the following example will return a sign bit mask for a 32-bit integer.
The macro in the following example will convert the 8-bit integer stored in a char data type to a 64-bit integer and correctly extend the
sign.
The macro in the following example will store a 1 in endian if the compilation was big endian; otherwise, it will store a 0 in endian.
AUTHOR
was developed by HP.
FILES
SEE ALSO
inttypes(5), limits(5), printf(3S), scanf(3S).
portal(5)