Sponsored Content
Full Discussion: VI command for File Please
Top Forums UNIX for Dummies Questions & Answers VI command for File Please Post 82659 by Unbeliever on Monday 5th of September 2005 04:23:06 AM
Old 09-05-2005
Might be a 'quote' problem. Best thing to do is to put the code into a file. For example call it 'process.pl'

Code:
while($line=<>)
{
  printf ("%.3f\n",($line/1000));
}

And the from your XP command line do:

Code:
perl process.pl inputfile.txt > outputfile.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk/sed Command : Parse parameter file / send the lines to the ksh export command

Sorry for the duplicate thread this one is similar to the one in https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121 Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies

2. Shell Programming and Scripting

File mgt: Do you know the command line command

I need a commnad to modify a file's contents from: 2009-06-18 14:14:38 CST INF Thread-114 rlo.aaf_ - MASSHANDLE: Got a valid message<Location=""><bob>2</bob><carol>61</carol><ted>54</ted><alice>1m</alice> to this : 2009-06-18 14:14:38 CST INF Thread-114 rlo.aaf_ - MASSHANDLE: Got a... (4 Replies)
Discussion started by: linux_lou
4 Replies

3. Shell Programming and Scripting

sed command for copying the contents of other file replacing it another file on specifc pattern

We have 2 file XML files - FILE1.XML and FILE2.xml - we need copy the contents of FILE1.XML and replace in FILE2.xml pattern "<assignedAttributeList></assignedAttributeList>" FILE1.XML 1. <itemList> 2. <item type="Manufactured"> 3. <resourceCode>431048</resourceCode> 4. ... (0 Replies)
Discussion started by: balrajg
0 Replies

4. Shell Programming and Scripting

Splitting a file in to multiple files and passing each individual file to a command

I have an input file with contents like: MainFile.dat: 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 12247689|7896|77698080 16768900|hh78|78959390 ... (4 Replies)
Discussion started by: rkrish
4 Replies

5. Shell Programming and Scripting

find specific file names and execute a command depending on file's name

Hi, As a newbie, I'm desperate ro make my shell script work. I'd like a script which checks all the files in a directory, check the file name, if the file name ends with "extracted", store it in a variable, if it has a suffix of ".roi" stores in another variable. I'm going to use these two... (3 Replies)
Discussion started by: armando110
3 Replies

6. Shell Programming and Scripting

How to use awk command(file) with file command?

how can i call awk file "average.awk" (code as follows) with file commands like ls -s... #!/bin/awk -f BEGIN { # How many lines lines=0; total=0; } { # this code is executed once for each line # increase the number of files # lines++; # increase the total size, which is field #1... (2 Replies)
Discussion started by: JayDoshi
2 Replies

7. UNIX for Advanced & Expert Users

File command return wrong filetype while file holds group separator char.

hi, I am trying to get the FileType using the File command. I have one file, which holds Group separator along with ASCII character. It's a Text file. But when I ran the File command the FileType is coming as "data". It should be "ASCII, Text file". Is the latest version of File... (6 Replies)
Discussion started by: Arpitak29
6 Replies

8. Shell Programming and Scripting

Speed : awk command to count the occurrences of fields from one file present in the other file

Hi, file1.txt AAA BBB CCC DDD file2.txt abc|AAA|AAAabcbcs|fnwufnq bca|nwruqf|AAA|fwfwwefwef fmimwe|BBB|fnqwufw|wufbqw wcdbi|CCC|wefnwin|wfwwf DDD|wabvfav|wqef|fwbwqfwfe i need the count of rows of file1.txt present in the file2.txt required output: AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies

9. Shell Programming and Scripting

Unable to attach a .txt file or .log file to mail and mailx command

Hi, I am trying to attach a .log file or .txt file to mail command to send an email once my ksh script executed. I am unable to use mutt command as it has been not installed and i am not supposed to install it. I have tried many ways by googling which has not helped me to succeed. Here is my... (5 Replies)
Discussion started by: Samah
5 Replies

10. Shell Programming and Scripting

Create a text file and a pdf file from Linux command results.

Hello. The task : Using multiple commands like : gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file. For readiness I must insert page break. When the program is finished I want to convert the final text file to a pdf file. When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
idnconv(1)							   User Commands							idnconv(1)

NAME
idnconv - Internationalized Domain Name (IDN) encoding conversion utility SYNOPSIS
idnconv [-i in-code | --in in-code | -f in-code | --from in-code] [-o out-code | --out out-code | -t out-code | --to out-code] [-a | --asciicheck | --ascii-check] [-A | --noasciicheck | --no-ascii-check] [-b | --bidicheck | --bidi-check] [-B | --nobidicheck | --no- bidi-check] [-l | --lengthcheck | --length-check] [-L | --nolengthcheck | --no-length-check] [-n | --nameprep] [-N | --nonameprep | --no-nameprep] [-u | --unassigncheck | --unassign-check] [-U | --nounassigncheck | --no-unassign-check] [-h | --help] [-v | --version] [file...] DESCRIPTION
idnconv converts the codeset or encoding of given text, if applicable. You can change the conversion with different options. idnconv reads from file or standard input and writes the results to standard output. When more than one IDN names or labels are supplied as input, such names or labels can be delimitered by using white-space characters of the POSIX locale or the label separators defined in the RFC 3490. The main use for idnconv is to convert Internationalized Domain Names in one codeset or encoding to another codeset or encoding. For instance, you can use the utility to convert IDN names in UTF-8 codeset to ASCII Compatible Encoding (ACE) encoded IDN names in 7-bit ASCII. For any other codeset conversion purposes, use iconv(1) instead. OPTIONS
The following options are supported: -a | --asciicheck | --ascii-check During IDN conversion process, enforce ASCII character range checks. This is identical to setting the UseSTD3ASCIIRules flag described in RFC 3490. For more details on the ASCII character range checks, refer to idn_encodename(3EXT) and RFC 3490. This is the default. -A | --noasciicheck | --no-ascii-check During IDN conversion process, do not perform ASCII character range checks. This is identical to unsetting the UseSTD3ASCIIRules flag described in RFC 3490. For more details on the ASCII character range checks, refer to idn_encodename(3EXT) and RFC 3490. -b | --bidicheck | --bidi-check During IDN conversion process, enforce checkings on bidirectional strings as specified in RFC 3491 and RFC 3454. This is the default. -B | --nobidicheck | --no-bidi-check During IDN conversion process, do not perform checkings on bidirectional strings which is specified in RFC 3491 and RFC 3454. -h | --help Print information about the utility and the options it supports. All other options and operands if any are ignored. -i in-code| --in in-code| -f in-code | --from in-code Identify the input codeset with the in-code argument. All iconv code conversion names that can be converted to UTF-8 can be used as the value of the in-code. If not supplied, the current locale's codeset is assumed as the codeset of the input. The utility also checks each individual name in the actual input and if the name is in ACE, the ACE is assumed as the in-code for the name. -l | --lengthcheck | --length-check During IDN conversion process, enforce label length check. See idn_encodename(3EXT) and RFC 3490. This ensures that the length of each label is in the range of 1 to 63. This is the default. -L | --nolengthcheck | --no-length-check During IDN conversion process, do not perform label length check. See idn_encodename(3EXT) and RFC 3490. -n | --nameprep During IDN conversion process, enforce Nameprep step as specified in the RFC 3490, RFC 3491, and RFC 3454. This is the default. -N | --nonameprep | --no-nameprep During IDN conversion process, do not perform Nameprep step. For more details on the Nameprep, refer to idn_encodename(3EXT), RFC 3490, RFC 3491, and RFC 3454. -o out-code | --out out-code | --t out-code | --to out-code Identify the output codeset with the out-code argument. All iconv code conversion names that can be converted to UTF-8 can be used as the value of the out-code. If not supplied, the current locale's codeset is assumed as the codeset of the output; if the in-code is ACE, then, the utility tries to convert names from actual input to non-ACE IDN names in the output codeset. -u | --unassigncheck | --unassign-check During IDN conversion process, enforce unassigned character checking. This is identical to unsetting the AllowUnassigned flag described in the RFC 3490. This option is useful when the IDN names are con- verted for storing purpose or to give the names to server machines. For more details on the unassigned character checking, refer to RFC 3490, RFC 3491, and RFC 3454. This is the default. -U | --nounassigncheck | --no-unassign-check During IDN conversion process, do not perform unassigned character checking. This is identical to setting the AllowUnassigned flag described in the RFC 3490. This option is useful when the IDN names are converted for the query purpose. For more details on the unassigned character checking, refer to RFC 3490, RFC 3491, and RFC 3454. -v | --version Prints information about the utility's name, version, and legal status. All other options and operands if any are ignored. OPERANDS
The following operands are supported: file A path name of the input file to be converted. If file is omitted, the standard input is used. EXAMPLES
Example 1: Converting IDN Names The following example converts IDN names. It reads names in the current locale's codeset from standard input. It converts and writes the converted results to results.txt file. If the names given to the utility are in ACE, the results are non-ACE IDN names in the current locale's codeset. If the names given to the utility are in non-ACE IDN names, the results are IDN names in ACE. example% idnconv > results.txt Example 2: Converting an ACE Encoded IDN Name The following example converts an ACE encoded IDN name into an IDN name in UTF-8. It reads xn--1lq90i which is in ACE encoding from standard input. It writes the converted results to file Beijing-UTF-8.txt. The file con- tains Beijing in two Chinese letters in UTF-8 codeset. example% idnconv -t UTF-8 > Beijing-UTF-8.txt xn--1lq90i <CTRL>d Example 3: Converting Names in KOI8-R Cyrillic Single Byte Codeset The following example converts names in KOI8-R Cyrillic single byte codeset to ACE encoded names. It reads from file inputfile.txt which is in KOI8-R. It writes the converted results to standard output. The results are in ACE encoding. example% idnconv --in KOI8-R --out ACE inputfile.txt xn--80adxhks xn--90aqflb3d1a xn--80aesccdb4a2a8c example% Example 4: Converting Names for Storing Purpose The following example converts names for storing purposes. It reads from file inputfile.txt that is in ISO8859-1. It converts and writes the results to the outputfile.txt in ACE. It also yields ACE names that are good to be used as server names. example% idnconv --from ISO8859-1 --to ACE --unassign-check inputfile.txt > outputfile.txt Example 5: Converting Names for Query Purposes The following example converts names for query purposes. It reads from standard input in the current locale's codeset. It converts and writes the results to the outputfile.txt in ACE: example% idnconv -U -t ACE > outputfile.txt ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of idnconv: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Not supported in-code or out-code value. 2 ASCII character range checking has failed. 3 Checkings on bidirectional strings have failed. 4 Label length checking has failed. 5 Nameprep step reported an error. 6 Unassigned character has been found. 7 Illegal or unknown option has been supplied. 8 Input file cannot be found. 9 Not enough memory. 10 During internal iconv code conversions, conversion error occurred. 11 During internal iconv code conversions, non-identical code conversion has happened. >11 Unspecified error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWidnu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
iconv(1), iconv(3C), iconv_close(3C), iconv_open(3C), idn_decodename(3EXT), idn_decodename2(3EXT), idn_encodename(3EXT), attributes(5), environ(5), iconv(5) RFC 3490 Internationalizing Domain Names in Applications (IDNA) RFC 3491 Nameprep: A Stringprep Profile for Internationalized Domain Names (IDN) RFC 3492 Punycode: A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA) RFC 3454 Preparation of Internationalized Strings ("stringprep") RFC 952 DoD Internet Host Table Specification RFC 921 Domain Name System Implementation Schedule - Revised STD 3, RFC 1122 Requirements for Internet Hosts -- Communication Layers STD 3, RFC 1123 Requirements for Internet Hosts -- Applications and Support Unicode Standard Annex #15: Unicode Normalization Forms, Version 3.2.0.http://www.unicode.org/unicode/reports/tr15/tr15-22.html International Language Environments Guide NOTES
For the generic information on IDN in applications, refer to RFC 3490 and the International Language Environments Guide. There are some distinctions between the storing purpose and the querying purpose when you decide on the names of systems. For more details on the terms and distinctions, refer to RFC 3454. SunOS 5.10 21 Jun 2004 idnconv(1)
All times are GMT -4. The time now is 07:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy