Sponsored Content
Full Discussion: Perl Text manipulation
Top Forums Shell Programming and Scripting Perl Text manipulation Post 302348934 by figaro on Sunday 30th of August 2009 12:41:05 PM
Old 08-30-2009
If having a third column in the spreadsheet is acceptable, then you could keep the string "hostname3.yahoo.com" in the file and the solution would be easy to do if you start with an IP checker written in the shell language, some of which is written here: https://www.unix.com/shell-programmin...idation-2.html
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Text Manipulation.

Hi I have only ever used awk and sed for basic requirements up until now. I have had to break a log down for multiple purposes. Using awk, sed and a date script. I am left with this: (message id, time of msg attempt, message id, domain name, time of msg completion) ... (4 Replies)
Discussion started by: Icepick
4 Replies

2. UNIX for Dummies Questions & Answers

Help with text manipulation

Hi there, I have some text files in unix format that processed by a program in windows, and when I open them with less or vi in linux, a warn for opening binary file is prompted, and as shown in vi, between every two characters there was inserted a "^@". How can I fix this. Plus, there are over... (2 Replies)
Discussion started by: dustinwang2003
2 Replies

3. Shell Programming and Scripting

Perl Text Manipulation

I'm in need of help for a project that I'm working on. I believe Perl would be the best way of handling the string manipulation, however, I've barely used perl, and I'm used to BASH scripting. Another note is, this project is in a Windows environment, so I can use Perl, but I do not have shell... (1 Reply)
Discussion started by: drewrockshard
1 Replies

4. Shell Programming and Scripting

text manipulation

Hi All; i need to do text processing : I have a file: file1.txt >>>>>>>>>>>> 30 2 23 some 30 2 22 text 30 2 21 xyz 30 2 20 ttttt 30 2 19 ttttt-1 30 2 18 xryz 30 2 17 xyzr 30 2 16 xy111z 30 2 15 xanyyz 30 2 14 xzz 30 2 13 xyy 30 2 0 zzz-w 50 3 25 zzz-w 50 3 12 productw 50 3 10... (4 Replies)
Discussion started by: unlx
4 Replies

5. Shell Programming and Scripting

Text Manipulation Help

Hello unix.com people! How can I modify a text in format: A:B:C A:B:C A:B:C into C/A/B C/A/B C/A/B Note: Text is line by line and "C", "B", "A" fields are different each row. Thanks in advance. (7 Replies)
Discussion started by: galford
7 Replies

6. UNIX for Dummies Questions & Answers

text manipulation help

Hello again unix.com How can I extract from a large file in format: steve@aol.com steve hawkins Location of this member is bla bla bla sun@hotmail.com Sun Ying This member is using browser bla bla bla to another text in format: steve@aol.com steve hawkins sun@hotmail.com sun ying ... (5 Replies)
Discussion started by: galford
5 Replies

7. UNIX for Dummies Questions & Answers

Text Manipulation Help

Hello Unix.com, I have a text in format: john sara lee How can I make it: john:john john:john1 john:john12 john:john123 sara:sara sara:sara12 sara:sara123 and so on (2 Replies)
Discussion started by: galford
2 Replies

8. UNIX for Dummies Questions & Answers

Text manipulation help

Hello unix.com users, I have a ip file (line-by-line). How can I delete the ips that keep repeating by mark XXX.XXX.XXX.* ... I want to erase only the lines that keep repeating more than 2 times. Example: 1.2.3.1 1.2.3.2 1.2.3.3 I want to erase all ips blocks that are repeating by C... (1 Reply)
Discussion started by: galford
1 Replies

9. UNIX for Dummies Questions & Answers

Text manipulation help

Hello unix.com I'm having trouble with a text file. It looks like this: Alvaro Costa Daldit Kaur Sings Brian G Heward Desmond Ogilvie John Der William Gherasim Lance Mackey Donald Kopplin Robert Mckinlay Jahir Hussain Mohamed Jack Benaim Abraham Weiss I want... (7 Replies)
Discussion started by: galford
7 Replies

10. UNIX for Dummies Questions & Answers

Text manipulation

i want to generate a list line-by-line of normal characters using letters . for example : dnds gnos mgod pets jnfp etc... i want to use all letters with all the posibilities is there a script that can do this ? (3 Replies)
Discussion started by: suppliernr1
3 Replies
RHINO(1)						      General Commands Manual							  RHINO(1)

NAME
rhino - invokes the JavaScript shell for running scripts in batch mode or interactive SYNOPSIS
rhino [options] script_filename_or_url [script_arguments] DESCRIPTION
This manual page documents briefly the rhino command. This manual page was written for the Debian distribution because the original pro- gram does not have a manual page. It is written according to the html documentation. rhino is a start script for the rhino JavaScript shell which provides a simple way to run scripts in batch mode or an interactive environ- ment for exploratory programming. OPTIONS
-e script_source Executes script_source as a JavaScript script. -f script_filename_or_url Reads script_filename_or_url content and execute it as a JavaScript script. -opt, -O optLevel Optimizes at level optLevel, which must be an integer between -1 and 9. -1 means Interpretive mode is always used. 0 means no opti- mizations whereas 9 means all optimizations are performed. -version versionNumber Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, or 140. See JavaScript Language Versions for more information on language versions. -strict Enable strict mode. PREDEFINED PROPERTIES
Scripts executing in the shell have access to some additional properties of the top-level object. arguments The arguments object is an array containing the strings of all the arguments given at the command line when the shell was invoked. help() Executing the help function will print usage and help messages. defineClass(className) Define an extension using the Java class named with the string argument className. Uses ScriptableObject.defineClass() to define the extension. deserialize(filename) Restore from the specified file an object previously written by a call to serialize. load([filename,...]) Load JavaScript source files named by string arguments. If multiple arguments are given, each file is read in and executed in turn. loadClass(className) Load and execute the class named by the string argument className. The class must be a class that implements the Script interface, as will any script compiled by jsc. print([expr...]) Evaluate and print expressions. Evaluates each expression, converts the result to a string, and prints it. readFile(path[,characterCoding]) Read given file and convert its bytes to a string using the specified character coding or default character coding if explicit cod- ing argument is not given. readUrl(url[,characterCoding]) Open an input connection to the given string url, read all its bytes and convert them to a string using the specified character cod- ing or default character coding if explicit coding argument is not given. runCommand(commandName,[arg,...][options]) Execute the specified command with the given argument and options as a separate process and return the exit status of the process. For details, see JavaDoc for org.mozilla.javascript.tools.shell.Global#runCommand. serialize(object,filename) Serialize the given object to the specified file. spawn(functionOrScript) Run the given function or script in a different thread. sync(function) creates a synchronized function (in the sense of a Java synchronized method) from an existing function. The new function synchro- nizes on the this object of its invocation. quit() Quit shell. The shell will also quit in interactive mode if an end-of-file character is typed at the prompt. version([number]) Get or set JavaScript version number. If no argument is supplied, the current version number is returned. If an argument is sup- plied, it is expected to be one of 100, 110, 120, 130, or 140 to indicate JavaScript version 1.0, 1.1, 1.2, 1.3, or 1.4 respec- tively. SEE ALSO
The online documentation under http://www.mozilla.org/rhino/shell.html AUTHOR
This manual page was written by Wolfgang Baer <WBaer@gmx.de>, for the Debian project (but may be used by others). February 12, 2005 RHINO(1)
All times are GMT -4. The time now is 11:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy