Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to call variables from a file to the scripting file? Post 303043127 by RudiC on Sunday 19th of January 2020 10:09:35 AM
Old 01-19-2020
Pls share (and interpret) the error messages you certainly get.

Quote:
Originally Posted by TestKing
... but it doesn't work......
is not too good a starting point for doing analyses.


Quote:
Also, how do I assign parameter to evoke each value from Test1.txt so that each value will be assigned to respective category when printed out...
Did you consider the read var1 var2 var3 (builtin) command?


Quote:
Code:
Subject  Verb   Object
Tom      is          a boy
Jim       is          a dog

You mayhap should rely on the order of items to be assigned to a category only if you are very sure you have a rigidly structured and well behaved file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file activity (open/closed) file descriptor info using KORN shell scripting

I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
Discussion started by: Gary Dunn
3 Replies

2. Shell Programming and Scripting

reading from a file and pass as variables and ignore # in the file

file.txt contains ------------------ sat1 1300 #sat2 2400 sat3 sat4 500 sat5 I need to write a shell script that will output like the below #output sat1.ksh 1300 sat3.ksh sat4.ksh 500 sat5.ksh my try ------- (4 Replies)
Discussion started by: konark
4 Replies

3. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

4. Shell Programming and Scripting

How to call a batch file in Make file?

Hii I wanna call a batch file from a make file. Doesn't work , what is the procedure to do this.? Any idea thanks:eek: (2 Replies)
Discussion started by: krishnampkkm
2 Replies

5. Shell Programming and Scripting

Read file and for each line replace two variables, add strings and save output in another file

Hi All, I have a file, let's call it "info.tmp" that contains data like this .. ABC123456 PCX333445 BCD789833 I need to read "info.tmp" and for each line add strings in a way that the final output is put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)' where XXX... (5 Replies)
Discussion started by: Andy_ARG
5 Replies

6. Shell Programming and Scripting

Bash: Reading a file and assigning variables from file

I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies

7. Shell Programming and Scripting

How to search and append words in the same file using unix scripting file operations

Hi , I have a file myhost.txt which contains below, 127.0.0.1 localhost 1.17.1.5 atrpx958 11.17.10.11 atrpx958zone nsybhost I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone. How to search the word atrpx958(which is hostname) only,... (5 Replies)
Discussion started by: gsreeni
5 Replies

8. Shell Programming and Scripting

Shell scripting - need to arrange the columns from multiple file into a single file

Hi friends please help me on below, i have 5 files like below file1 is x 10 y 20 z 15 file2 is x 100 z 245 file3 is y 78 z 23 file4 is x 100 (3 Replies)
Discussion started by: siva kumar
3 Replies

9. Shell Programming and Scripting

How to read each line from input file, assign variables, and echo to output file?

I've got a file that looks like this (spaces before first entries intentional): 12345650-000005000GL140227 ANNUAL HELC FEE EN 22345650-000005000GL140227 ANNUAL HELC FEE EN 32345650-000005000GL140227 ANNUAL HELC FEE EN I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies

10. Shell Programming and Scripting

Need Help: Shell script to call sql session with variables stored in .txt file

Hi, I need help in writing a shell script which can read data from a text file (Cancel_ID.txt) and then calls sqlplus session (Cancel.sql) with the first line parameter of the text file ("0322600453") till all rows are not completed. ... (4 Replies)
Discussion started by: Khan28
4 Replies
URLS.TXT(5)							File Formats Manual						       URLS.TXT(5)

NAME
urls.txt - URL database for regression testing INTRODUCTION
The urls.txt file is installed by default in /etc/siege/urls.txt. When siege is invoked without a command line reference to a URL, then by default it looks for urls in that file. The advantage of using the urls.txt file is two-fold: One, it frees you free retyping a url with every invocation. And two, it allows you to conduct full site regression testing. When the urls.txt file is used, siege reads all the urls in that file into memory and runs through the list in one of two ways, sequen- tially or randomly. The default run is sequential from start to finish and back again until the --reps or the --time option has been satis- fied. With the -i/--internet option selected, siege runs through the file randomly simulating the stress applied by a community of inter- net users. The -f/--file option allows you to select a file other then the default urls.txt file. You may also instruct siege to use a different file with the "file" directive in .siegerc, i.e., "file = /usr/local/etc/urls.txt" You may set and reference variables inside the urls.txt file. All variables must be declared BEFORE they are referenced. Variables are declared with the "=" operator, VARIABLE = VALUE. They are then referenced inside $() or ${}, example: $(HOST), ${HOST} HOST=joey.joedog.org http://${HOST}/browse.jsp?size=5 http://${HOST}/admin.jsp?name=ralph EXAMPLE FILE
This is an exmple urls.txt file. Lines beginning with a hash (#) are comments and ignored by siege. # # Example urls.txt file # URLs database for siege # http://www.haha.com/index.html http://www.haha.com/howto/index.html http://www.haha.com/cgi-bin/howto/display.cgi?1013 www.haha.com/cgi-bin/fm.cgi?first=j.&last=fulmer https://www.haha.com/index.shtml https://www.whoohoo.com/my_whoohoo.jsp # POST data requires a POST directive www.haha.com/cgi-bin/foo.cgi POST first=bart&last=simpson www.haha.com/hoho.jsp POST name=jeff&pass=secret # POST the contents of a file using the # line input character "<" http://www.haha.com/my.jsp POST </home/jeff/data.txt AUTHOR
Jeffrey Fulmer <jeff@joedog.org>, et al. BUGS
Report bugs to jeff@joedog.org. Give a detailed description of the problem and report the version of siege that you are using. COPYRIGHT
Copyright (C) 2007 Jeffrey Fulmer, et al. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AVAILABILITY
The most recent released version of siege is available by anonymous FTP from ftp.joedog.org in the directory pub/siege. SEE ALSO
siege(1) siege.config(1) layingsiege(7) Siege v2.70 April-17-2012 URLS.TXT(5)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy