running script and passing it as wordlist

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions running script and passing it as wordlist
# 1  
Old 04-12-2012
running script and passing it as wordlist

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

foreach loop

2. Relevant commands, code, scripts, algorithms:

using an awk statement inside but thats not the concern

3. The attempts at a solution (include all code and scripts):

Code:
foreach x( `script_that_produce_a_list` )

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Southampton, Bob Damper, comp1005

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 04-12-2012
Code:
for x in `something`
do
...
done

Or
Code:
something | while read LINE
do
...
done

# 3  
Old 04-12-2012
Quote:
Originally Posted by Corona688
Code:
for x in `something`
do
...
done

Or
Code:
something | while read LINE
do
...
done

Hi Corona688,

I couldn't do that as im actually running the loop inside a csh script. any help?
# 4  
Old 04-12-2012
Try:
foreach x ( "`script_that_produce_a_list`" )
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Remove Special Characters and Numbers From a Wordlist

I sux at this type of stuff. I have a huge wordlist. I want to get rid of everything in each word except the letters. I want to remove numbers and all special characters. And since this list was created using cewl I some how picked up something like so Latin characters and would like to remove them... (6 Replies)
Discussion started by: sub terra
6 Replies

2. Shell Programming and Scripting

Passing arguments while running the script

Hi, I have a requirement for creating a MQ (queue) where the inputs has to be passed as arguments. Running the script as below ./hi.sh "Servername" "QueueManagername" "QueuecreationCommand" cat hi.sh echo "Welcome to $1" runmqsc $2 < $3 But the queue creation command is... (9 Replies)
Discussion started by: Anusha M
9 Replies

3. Shell Programming and Scripting

Passing new options to a running command

I was just wondering if there is a way to pass an new option or argument to an already running command or program. Let us say you run "zenity --list <options>" and you like to add a title or change the title you used on it while it is already running, is it possible to do that? (1 Reply)
Discussion started by: cryogrid
1 Replies

4. UNIX for Dummies Questions & Answers

Passing shell script parameter value to awk command in side the script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff |... (1 Reply)
Discussion started by: Sarita Behera
1 Replies

5. Shell Programming and Scripting

Passing username and password to a script running inside "expect" script

Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send... (1 Reply)
Discussion started by: baddykam
1 Replies

6. Shell Programming and Scripting

Choose a single word from a wordlist by matching the letters it contains?

Hi, I have a text file with 1500 words. Could it be a script that will keep the words that only have all these letters: n i o m s c t a If you could show me the way I would be greatful! (32 Replies)
Discussion started by: hakermania
32 Replies

7. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies

8. UNIX for Advanced & Expert Users

Passing the values to the secondary script when it invoked by primary script

Hi, When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen. The file name to be processed is present in script s1.sh Now I... (2 Replies)
Discussion started by: venu_eie
2 Replies

9. Shell Programming and Scripting

Passing the values to the secondary script when it invoked by primary script

Hi, When I invoke a script s1.sh it will call an another script s2.sh by itself. This script s2.sh will call some java files, so while running the script it asks for a file name to be processed. Which we can see in the screen. The file name to be processed is present in script s1.sh Now... (1 Reply)
Discussion started by: venu_eie
1 Replies

10. Shell Programming and Scripting

batch or wordlist search and replace in one file

Hello Experts! I've become perplexed as to why I can't get this to work and have given up the male "I can do it" attitude. I am asking the unix experts. The script I am writing involves reading a file that contains thousands of keywords (not csv), just one line after another of keywords and... (1 Reply)
Discussion started by: zerobreach.com
1 Replies
Login or Register to Ask a Question