I need a better way to read the first character of each line in a file and check if it equals the special character ¤. This character tells me where there is a break in the reports. The file has over 500,000 lines. Currently, this is my code -
if ]
I am using Korn Shell as a scripting... (7 Replies)
Hi,
Maybe this iscorrect forum for my question...
I should read one character at a fixed position from each line of the file. So how ??? should be substituted in the code below:
while read line ; do
single_char=`???`
echo "$single_char"
done < $input_file
OK...I did get an... (0 Replies)
I have a script which reads from a job file and executed the scripts in the job file in sequence.
#! /bin/ksh
set -x
while read line
do
$line.ksh
if
# mail the team
fi
done <"$file"
The job file will be like
abcd
efgh
ijkl
mnop
qrst
This is working fine. I need to add... (2 Replies)
Hi All,
My file is a string of around 50K character.
I'm trying to insert new line after every 320 character in my file.
I know the command to insert newline, but problem is I'm not able to search 320th position.
Please advice. (6 Replies)
Hello guys,
I would need to remove the last character ")" of a specific line. This can be from any line. Your help is appreciated. Below is the line.
HOSTNAME=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP))
Please help. (6 Replies)
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
Discussion started by: bharath561989
19 Replies
9. Post Here to Contact Site Administrators and Moderators
I have Index Line and I tried to get the 9th character from the file and to check the character is "|" or not.
Shell Scripting.
Sample Index file.
"91799489|K8E|188.004.A.917994892.1099R.c.01.pdf|2013|10/15/2014|002|B|C|C"... (3 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT HPUX
tt_message_accepter
tt_message_accepter(library call) tt_message_accepter(library call)
NAME
tt_message_accepter -- return offer's nth accepting procid
SYNOPSIS
#include <Tt/tt_c.h>
char *tt_message_accepter(
Tt_message m,
int n);
DESCRIPTION
The tt_message_accepter function returns the procid of the nth accepter of the specified message.
The m argument is the opaque handle for the message involved in this operation. The n argument is the number of the accepter to be
returned. The first accepter is numbered zero.
RETURN VALUE
Upon successful completion, the tt_message_accepter function returns the procid of the nth accepter. The application can use tt_ptr_error
to extract one of the following Tt_status values from the returned pointer:
TT_OK The operation completed successfully.
TT_ERR_PROCID
There is no valid default procid, perhaps because tt_open has not yet been called.
TT_ERR_NUM
The integer value passed was invalid (out of range).
TT_ERR_STATE
The specified message is not in state TT_RETURNED. Since only TT_OFFERs can be in state TT_RETURNED, this status will be
returned if the specified message is a TT_NOTICE or a TT_REQUEST.
TT_ERR_POINTER
The pointer passed does not point to an object of the correct type for this operation.
APPLICATION USAGE
The application can use tt_free to free any data stored in the address returned by the ToolTalk API.
SEE ALSO
Tt/tt_c.h - Tttt_c(5), tt_message_accepters_count(3), tt_ptr_error(3), tt_free(3).
tt_message_accepter(library call)