Question

I have a file called word which contains: word1 word2 I have an executable file called...

I have a file called word which contains:

word1

word2

I have an executable file called print.csh which contains:

foreach v ( `cat file`)

echo $v

end

How am I suppose to run print.csh?

I tried ./print.csh word but it doesn't work.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) First install csh by using command

sudo apt-get install csh

2) Then execute script using

csh filename.csh

print.csh

foreach v (`cat word`)
echo $v
end

Output

koushikhp@koushikhpnew: koushikhp@koushikhpnew csh print.csh word1 word2 koushikhp@koushikhpnew:-$ cat word word1 word2 koush

Add a comment
Know the answer?
Add Answer to:
I have a file called word which contains: word1 word2 I have an executable file called...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I have a file called word which contains: word1 word2 I have an executable file called print.csh which contains: foreach v ( `cat file`) echo $v end How am I suppose to run print.csh? I tried ./print....

    I have a file called word which contains: word1 word2 I have an executable file called print.csh which contains: foreach v ( `cat file`) echo $v end How am I suppose to run print.csh? I tried ./print.csh word but it doesn't work.

  • .MODEL FLAT INCLUDE io.h i header file for input/output STACK 4096 .DATA word1 word 1234 result byte 6 dup(?), e .C...

    .MODEL FLAT INCLUDE io.h i header file for input/output STACK 4096 .DATA word1 word 1234 result byte 6 dup(?), e .CODE MainProc PROC wtoa result, word1 exit with return code e mov eax, ret MainProc ENDP END Assume you set a break point in ret statement and look at the memory that starts from the address of result. Write what your expect to see in the next 6 bytes starting from result. .MODEL FLAT INCLUDE io.h i header file for...

  • # DISCUSSION SECTION WORK: # # 1. STUDENTS: download this file, ds4.py, and wordsMany.txt, from #...

    # DISCUSSION SECTION WORK: # # 1. STUDENTS: download this file, ds4.py, and wordsMany.txt, from # http://www.cs.uiowa.edu/~cremer/courses/cs1210/etc/ds4/ # Save both in the same folder. # # 2. TA (aloud) and STUDENTS: Read the comments from START HERE! (just after these instructions) # to definition of anagramInfo function. Discuss any questions about what the functions should do. # # 3. TA demonstrate running anagramInfo("wordsMany.txt") on this unchanged file, to # see that it behaves reasonably despite having incomplete anagram-testing functions. #...

  • Hi, I need help with my comp sci assignment. The parameters are listed below, but I...

    Hi, I need help with my comp sci assignment. The parameters are listed below, but I am having trouble generating the number of occurrences of each word. Please use a standard library. Read in the clean text you generated in part 2 (start a new cpp file). Create a list of all the unique words found in the entire text file (use cleanedTextTest.txt for testing). Your list should be in the form of an array of structs, where each struct...

  • Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a....

    Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a. Write the following as script6.sh and change its permissions to count for num in d do if num eq 100 then count (count+1) done echo The number 10 was found $count times What is the output? Run the script as ./script6.sh 10 20 30 10 40 20 50 10 60 <enter Summarize what the script does r using the read command. The following script...

  • Creat a C Program that Reads words from a file called words, which contains one word...

    Creat a C Program that Reads words from a file called words, which contains one word per line.Each word has maximum length to M.The number of words in the file is equal to N. Incert each word to Binary Search Tree with node name dictionary.Each node of the tree must contain one word.The left child must contain a word that it is lexicographically smaller while the right child contains a lexicographically bigger one. 1) When you finish reading the file,...

  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • Subject: C++ I have created a class called QueueOfIntegers in a file called QueueOfIntegers.h, which is...

    Subject: C++ I have created a class called QueueOfIntegers in a file called QueueOfIntegers.h, which is here: #ifndef QueueOfIntegers_H #define QueueOfIntegers_H class QueueOfIntegers { public:    int elements[100]; //Array to store integers in the queue    int size; // Number of integers in the queue    QueueOfIntegers(); // Construct an empty queue    bool IsEmpty(); // Returns true if the queue is empty    int Peek(); // Returns the integer at the beginning of the Queue without removing it   ...

  • out1.txt File Directly Below... Note: "//notaword" is the part that is not a word and needs...

    out1.txt File Directly Below... Note: "//notaword" is the part that is not a word and needs to be handled and is specifically the part I am having trouble with https://www.dropbox.com/s/ume3slnphyhi6wt/out1.txt?dl=0 - link for the out1.txt file for testing yourself Please include comments as I am in this for learning and would really appreciate the help! Write a program that reads words from a text file and displays all the words (duplicates allowed) in ascending alphabetical order. The words must start...

  • Note that the main function that I have provided does use <string.h> as it constructs test...

    Note that the main function that I have provided does use <string.h> as it constructs test strings to pass to your functions. However, your solutions for the 5 functions below may not use any of the built-in C string functions from the <string.h> library. Write a function called strcmp373. This function is passed two parameters, both of which are C strings. You should use array syntax when writing this function; that is, you may use [ ], but not *...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT