Help for developing script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Help for developing script
Prev   Next
# 1  
Old 10-01-2013
Help for developing script

I want to develop a unix script.
Scenario:A folder is containing many text files and there is one text file eg. test.csv which is having 2 words at line 1 & line 2.The script should search for word at line 1 in test.csv file in all other text file present in folder & replace it with word at line 2 in test.csv file...pls help
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

Developing Applications for UNIX.COM

A number of people have asked me about the best way to develop some cool new web app for UNIX.COM. In today's "very easy web dev" world, developers do not need to be burdened (like I am) to the "back end" of the site. The best way to develop web apps is to build the application on your desktop... (2 Replies)
Discussion started by: Neo
2 Replies

2. Shell Programming and Scripting

Help with approach and developing script

Hi- I need to develop a script for following scenario in AIX and K shell environment.I am from windows server background for most my career ,so please bear with me and advise suitable approach and technical assistance.Having said that I am aware of unix shell commands but never pput together at... (1 Reply)
Discussion started by: nirasm
1 Replies

3. Shell Programming and Scripting

Help in developing an awk code

#!/bin/ksh set -x FILENAME=$1 #To calculate debit and credit DEBIT=`awk -F, '{value=$28 ;if(value<0) {debit+=value}} END {print debit}' $FILENAME` CREDIT=`awk -F, '{value=$28 ;if(value>0) {credit+=value}} END {print credit}' $FILENAME` #This part is not working since the debit value is... (2 Replies)
Discussion started by: selvankj
2 Replies

4. AIX

Developing application software on the AIX

I am a programmer who works on an IBM i (including AS/400, iSeries, System i and Power). In developing application software on the IBMi we use languages such as RPG/ILE and CLLE. There is a need also to use PF, LF, DSPF & PRTF to represent the physical/logical database and screen/print objects.... (0 Replies)
Discussion started by: Elias
0 Replies

5. UNIX for Dummies Questions & Answers

developing a Kernel for old old Unix?

Hello all , My father has been running the last version of unix before all the liscensing began 20 or so years ago. In his particular field his programmer has written a great deal of software to work with this version. Emulating so newer computers could speak to the unix server as well. Im sure... (6 Replies)
Discussion started by: Bill78
6 Replies

6. Shell Programming and Scripting

Developing own shell

Hi everyone.I am trying ti create my own shell in C.So far i have managed to create a parser to separate args from cmd line of my shell.(i have done nothing different for tokens is that wrong?).so i can run commands like "ls -l" "cp" "cat" etc.now i want to add redirection.can anyone guide me... (1 Reply)
Discussion started by: bashuser2
1 Replies

7. Programming

Help required in developing an Editor.

Hi, I wish to develop a editor of my own. My idea is using 100% C programming Linked list as the Data structure GNU/Linux as the compiling environment ncurses utility for screen Many of might have wrote a editor in your college itself as a project. But I am from non IT background.... (3 Replies)
Discussion started by: ramkrix
3 Replies

8. Shell Programming and Scripting

Can you help me regarding developing script?

Hi All, I want to develope this script. any help will be appreciated. It is possible to use two pipes and create two-way communication between two processes. (In practice, this is not done because sockets are available.) Create a program where the parent process reads the name of a language... (2 Replies)
Discussion started by: vishalpatel03
2 Replies

9. Programming

Developing Open Source tools

Hi Gurus, I am very much interested in developing and publishing a small piece of open source code which would be the best place to start off. I am just a beginner in unix ,c. Please provide me some suggestions. Thanks. (3 Replies)
Discussion started by: ennstate
3 Replies

10. UNIX for Advanced & Expert Users

Developing a new command line interface

Hi, Is there any good/easy tool or library which assists in developing a command line interface for an application. The CLI should be able to provide custom commands, allow programming/scripting as well. For the latter case it could wrap a shell command and send it to BASH for processing. (2 Replies)
Discussion started by: redirect
2 Replies
Login or Register to Ask a Question
jrunscript(1)						      General Commands Manual						     jrunscript(1)

NAME
jrunscript - command line script shell SYNOPSIS
jrunscript [ options ] [ arguments... ] PARAMETERS
options Options, if used, should follow immediately after the command name. arguments Arguments, if used, should follow immediately after options or command name. DESCRIPTION
jrunscript is a command line script shell. jrunscript supports both an interactive (read-eval-print) mode and a batch (-f option) mode of script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the -l option can be used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming" style. NOTE: This tool is experimental and may not be available in future versions of the JDK. OPTIONS
-classpath path Specify where to find the user's .class files that are accessed by the script. -cp path This is a synonym for -classpath path -Dname=value Set a Java system property. -Jflag Pass flag directly to the Java virtual machine on which jrunscript is run. -l language Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to spec- ify the corresponding script engine's jar file using -cp or -classpath option. -e script Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line. -encoding encoding Specify the character encoding used while reading script files. -f script-file Evaluate the given script file (batch mode). -f - Read and evaluate a script from standard input (interactive mode). -help Output help message and exit. -? Output help message and exit. -q List all script engines available and exit. ARGUMENTS
If [arguments...] are present and if no -e or -f option is used, then the first argument is the script file and the rest of the arguments, if any, are passed as script arguments. If [arguments..] and -e or -f option are used, then all [arguments..] are passed as script argu- ments. If [arguments..], -e and -f are missing, interactive mode is used. Script arguments are available to a script in an engine variable named "arguments" of type String array. EXAMPLES
Executing inline scripts jrunscript -e "print('hello world')" jrunscript -e "cat('http://java.sun.com')" Use specified language and evaluate given script file jrunscript -l js -f test.js Interactive mode jrunscript js>print('hello world'); hello world js>34 + 55 89 js> thread(function() { print('hello world'); } hello world js> Run script file with script arguments jrunscript test.js arg1 arg2 arg3 test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "argu- ments" array. SEE ALSO
If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built-in functions and objects. These JavaScript built-ins are documented in jsdocs. 06 Aug 2006 jrunscript(1)