How to iterate a function untill last argument with any order of input?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to iterate a function untill last argument with any order of input?
Prev   Next
# 2  
Old 07-20-2018
What shell is this? I don't recognise it. It looks more like C to me. If it is, we can move it to a more suitable forum.



Thanks, in advance,
Robin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to iterate Grep via all patterns provided in an input file?

When I use the following grep command with options -F and -f, its just displaying the text related to only the last pattern. Command: $ grep -f pattern_file.txt input_file.txt Output: doc-C2-16354 Even the following command yields the same output: Command: $ grep -Ff pattern_file.txt... (6 Replies)
Discussion started by: nsai
6 Replies

2. Shell Programming and Scripting

Read input files and merge them in given order and write them to input one param or one file

Dear Friends, I am looking for a shell script to merge input files into one file .. here is my idea: 1st paramter would be outfile file (all input files content) read all input files and merge them to input param 1 ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies

3. Shell Programming and Scripting

passing argument from one function to another

Hi all, In the given script code . I want to pass the maximum value that variable "i" will have in function DivideJobs () to variable $max of function SubmitCondorJob(). Any help? Thanks #!/bin/bash ... (55 Replies)
Discussion started by: nrjrasaxena
55 Replies

4. Shell Programming and Scripting

function terminating if i give input as space or no input and enter

HI i have written a script to ask input from the user. this script should promote the user for y/n input. if user enters anyother input then y/n the script promotes him again. this below code is working fine for all the cases. except for space and enter " if i give space and enter it is... (2 Replies)
Discussion started by: BHASKARREDDY006
2 Replies

5. Shell Programming and Scripting

Split function input and output order

Dear Forum I'm Trying to use split function to split a string, but the output is not as the same order as of the string, please see simple example echo " " | nawk -v var="First;Second;Third;Fourth" ' BEGIN {split(var, arr,";") for(i in arr){print arr }}' The output is Second Third... (6 Replies)
Discussion started by: yahyaaa
6 Replies

6. Shell Programming and Scripting

pass function as argument to a function

I have the following code : function1 () { print "January" } function2() { case $1 in January) print "Dzisiaj mamy styczen" ;; *) ;; } main() { (1 Reply)
Discussion started by: presul
1 Replies

7. Shell Programming and Scripting

Passing more than one argument in a function

Hi All, Calling a function with one argument and storing the return value in a shell script is as below:( so far I know) value="`fun_1 "argument1"`" Its working perfectly for me. Can u help me with passing more than one argument and storing the return value Thnaks in advance JS (1 Reply)
Discussion started by: jisha
1 Replies

8. UNIX for Dummies Questions & Answers

Pass argument to function

Hi, Can someone please explain to me how I can get a function to recognize a file given as an argument to a script. Suppose the script has the argument as follows: sh script file and the function is as follows: function display_file () { cat $1 } and it s then called #main program... (1 Reply)
Discussion started by: Knotty
1 Replies

9. Programming

How do I input an argument in the main?

----------C program----------------------------- include <stdio.h> int main( int argc, char *argv ) { int i; for( i=0; i<argc; i++ ) printf("%\n", argv); return 0; } I wrote the C program above 'print.c'. Then, I compiled. (gcc -o print.o print.c)... (2 Replies)
Discussion started by: yhosun
2 Replies

10. UNIX for Dummies Questions & Answers

Passing Argument to Function

May i know how to pass an argument to a function in a shell script? Sorry, i din stated that it is in a shell script in my previous post. Means: checkStatus() { ........... } read status; I wanna use the status in the function checkstatus, how... (2 Replies)
Discussion started by: AkumaTay
2 Replies
Login or Register to Ask a Question
gnome-dictionary(1)					      General Commands Manual					       gnome-dictionary(1)

NAME
gnome-dictionary - Look up words on dictionaries SYNOPSIS
gnome-dictionary gnome-dictionary [options] or select Dictionary from the Accessories submenu of the Applications menu. DESCRIPTION
GNOME Dictionary provides dictionary definitions of words, using a dictionary source. For full documentation see the GNOME Dictionary online help. OPTIONS
--look-up word Looks up the specified word using the pre-defined dictionary source. --match word Matches one or more words using the pre-defined dictionary source. -s source or --source source Uses the specified source for looking up words. This does not affect the global settings. -D database or --database database Use the specified database for looking up words. This does not affect the global settings. -S strategy or --strategy strategy Use the specified strategy for looking up words. This does not affect the global settings. --help Display help information. CONFIGURATION
All the configuration is handled using GConf. AUTHOR
GNOME Dictionary was originally written by Spiros Papadimitriou (<spapadim+@cs.cmu.edu>), Mike Hughes (<mfh@psilord.com>) and Bradford Hov- inen (<hovinen@udel.edu>). Emmanuele Bassi (<ebassi@gmail.com>) rewrote it from scratch. This manual page was originally written by Jochen Voss <voss@mathematik.uni-kl.de>. SEE ALSO
dict(1), dictd(8), http://www.dict.org/, RFC 2229 gnome-utils 2.13.4 Jan 2 2005 gnome-dictionary(1)