Visit The New, Modern Unix Linux Community

Top Forums Shell Programming and Scripting Insertion New line whilst reading the text file Post 302386308 by rdcwayx on Tuesday 12th of January 2010 05:30:13 AM
 awk '{print $0"\n"}' t.txt

Test Your Knowledge in Computers #150
Difficulty: Easy
Oracle discontinued OpenSolaris after their acquisition of Sun Microsystems.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading line of text

Hi, Maybe a biggy but I want to make it clear what i'm trying to achieve...... I'm a big stuck and need a bit of a pointer. I'm not sure how to explain this. :confused: My input file follows the format below. When I read the file each time I get a ~FILE? I want to assign it to var1 then... (2 Replies)
Discussion started by: nhatch
2 Replies

2. Shell Programming and Scripting

reading text file line by line

Ok. before anyone mentions it, I did search for this but I'm not sure if I am looking for the right thing. Now, onto my issue. I have been keeping vmstats output in running text files. So I have a file that looks like this: vmstat 2 5 2005.09.19 kthr memory page ... (6 Replies)
Discussion started by: MizzGail
6 Replies

3. Shell Programming and Scripting

Reading data from a specific line in a text file

hello, I have got the following problem that I am hoping someone can help with please. 1. I have got the following text file (below) , the columns data are 'Test Day', 'Board', 'Betting Number'. TEXT FILE ============================================ 1 3 02-01-27-28-29-30 0 1... (1 Reply)
Discussion started by: jermaine4ever
1 Replies

4. Shell Programming and Scripting

Reading data from a specific line in a text file

Hello, I have a problem which is giving me headache for days, can some please help. Please see code and text fiel below. Please see text in red for the problem I am facing # Program gets an input x from user while read line ; do echo... (4 Replies)
Discussion started by: jermaine4ever
4 Replies

5. Shell Programming and Scripting

[Solved] Problem in reading a file line by line till it reaches a white line

So, I want to read line-by-line a text file with unknown number of files.... So: a=1 b=1 while ; do b=`sed -n '$ap' test` a=`expr $a + 1` $here do something with b etc done the problem is that sed does not seem to recognise the $a, even when trying sed -n ' $a p' So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies

6. Shell Programming and Scripting

reading line by line from a text file

Hi, I have a text file something like this:, ldap, cn=users,dc=example,dc=com ..... ... and many more lines ... ... now i want to read each individual line from the file and assign it to a variable example: the script should read and assign it to a variable say... (3 Replies)
Discussion started by: sunrexstar
3 Replies

7. Shell Programming and Scripting

Text file insertion via sed

I have 800+ html files that need to have a javascript added to them in the head. I can do the looping, setting filenames as variables, etc. but I cannot figure out how to insert my javascript file into the html. My javascript is in a file named jsinsert.txt It basically has this format:... (4 Replies)
Discussion started by: Trapper
4 Replies

8. Shell Programming and Scripting

EXPECT: Assign variable by reading a line of text from a file

Hi All, I have been using a program on windows called AutoKey. My environment at work is Linux and I have been experimenting with expect. Very powerful. I can move my AutoKey scripts to Linux using Expect once I am educated on how to read from a file using Expect. My application would be... (1 Reply)
Discussion started by: quemalr
1 Replies

9. Shell Programming and Scripting

Reading text file, comparing a value in a line, and placing only part of the line in a variable?

I need some help. I would like to read in a text file. Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01. Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies

10. Shell Programming and Scripting

Problem with while loop reading every line of a text file

Hello, I'm using RHEL 5.1 with bash. How to handle "read" inside while loop reading every line? Please see below: # cat /tmp/passwd_sample CARRJ12:qVSn4ja4mFA72,..:20021:125:JULIAN CARR:/home/everyone:/bin/bash HERCOT01:NK/3j2ZB4ZC7Q:20022:125:TOM HERCOCK:/home/everyone:/bin/bash... (4 Replies)
Discussion started by: reddyr
4 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck ( COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)

Featured Tech Videos

All times are GMT -4. The time now is 03:14 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy