How to call variables from a file to the scripting file?
Let say I have a file with variables (Test1.txt)
In Test1.txt file, it consists of
In the other scripting file (RunTest1.sh), I have
I managed to call variables from the another file to the executing file, but the content from the another file would not show unless cat command is used...... I tried using for loop to print out each value, but it gets the directory instead....How do I assign a parameter to take the value from the other file? I would like the result to be shown as below....
Moderator's Comments:
Please do wrap your samples in CODE TAGS as per forum rules.
I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
file.txt contains
------------------
sat1 1300
#sat2 2400
sat3
sat4 500
sat5
I need to write a shell script that will output like the below
#output
sat1.ksh 1300
sat3.ksh
sat4.ksh 500
sat5.ksh
my try
------- (4 Replies)
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958(which is hostname) only,... (5 Replies)
Hi friends
please help me on below,
i have 5 files like below
file1 is
x 10
y 20
z 15
file2 is
x 100
z 245
file3 is
y 78
z 23
file4 is
x 100 (3 Replies)
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Hi,
I need help in writing a shell script which can read data from a text file (Cancel_ID.txt) and then calls sqlplus session (Cancel.sql) with the first line parameter of the text file ("0322600453") till all rows are not completed.
... (4 Replies)
Discussion started by: Khan28
4 Replies
LEARN ABOUT SUNOS
ibmjtoeuc
euctoibmj(1) User Commands euctoibmj(1)NAME
euctoibmj, ibmjtoeuc - Code conversion between Japanese EUC and IBM-Japanese
SYNOPSIS
euctoibmj [-t] [-u code] [-U] [filename...]
ibmjtoeuc [-u code] [-U] [filename...]
AVAILABILITY
SUNWjfpu
DESCRIPTION
euctoibmj converts the contents of the specified filenames from ASCII/ Japanese EUC to EBCDIC/IBM-Japanese. ibmjtoeuc converts the con-
tents of the specified filenames from EBCDIC/IBM-Japanese to ASCII/ Japanese EUC. The both commands write the resultant code to stdout.
If filename is not given, input characters are read from the standard input.
For Japanese language handling, the euctoibmj/ibmjtoeucj pair of commands provide conversion only between the two code standards. Code con-
version among Japanese EUC, JIS, and PC kanji are supported by another set of commands, jistoeuc(1) family or iconv(1).
OPTIONS -u code With this option specified, characters in one code set that do not have corresponding characters in the other are mapped to the
code given in four-digit hexadecimal HOST CODE of IBM Japanese (for euctoibmj) or in four-digit JIS Ku-Ten code (for ibmjtoeuc).
Without this option, such characters are mapped to HOST CODE 4040 (for euctoibmj) or JIS Ku-Ten code 0101 (for ibmjtoeuc).
-U The output is not buffered (The default is buffered output).
-t With this option specified, euctoibmj translates Half-Size Katakana (Code Set 2) in Japanese EUC to the corresponding characters
in Code Set 1 prior to conversion. Without this option, Code Set 2 characters in Japanese EUC are processed to the illegal charac-
ter.
ENVIRONMENT VARIABLES
The environment variables LC_CTYPE and LANG control the character classification throughout these commands. For euctoibmj and ibmjtoeuc to
work correctly, one or both of the environment variables must be set to ja or an equivalent locale. On entry to these commands, these envi-
ronment variables are checked in the following order: LC_CTYPE and LANG. When a valid value is found, remaining environment variables for
character classification are ignored.
FILES
/usr/lib/jcodetables/ibmj-euc
Code conversion table for IBM Japanese.
SEE ALSO iconv(1), jistoeuc(1), iconv_ja(5)DIAGNOSTICS
unexpected data encountered in input.
Illegal character code is found in input file.
BUGS
The ASCII/EBCDIC conversion table are taken from the 256 character standard in the CACM Nov, 1968. The conversion, while less blessed as
a standard, corresponds better to certain IBM print train convertions. There is no universal solution.
The Japanese EUC/IBM Japanese conversion table is based on the IBM Kanji codebook (4th edition - September 1987), JIS X 0201, and JIS X
0208-1983.
If JIS X 0212 caracter set is specified as input, euctoibmj can not support the conversion correctly.
SunOS 5.10 10 Jan 2003 euctoibmj(1)