10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to compare a value from test file and redirect the o/p value to the same file
input file
250 32000 32 128
Below is my code
awk '{ if ($1 < "300") print $1 > /tmp/test}' test
want to compare 250 < 300 then print 300 to the same place
below is the... (24 Replies)
Discussion started by: stew
24 Replies
2. Shell Programming and Scripting
Hi ,
i am having an file which contains 5 file_name data, i need to read the file name and will perform certain operation and generate out file names with named as 5 individual file_names
for eg:
file.txt contains
file_name1.txt|hai
file_name2.txt|bye
file_name3.txt|how... (3 Replies)
Discussion started by: rohit_shinez
3 Replies
3. Shell Programming and Scripting
Suppose I have a program that I've written that accepts input, ie this C++ program:
#include <iostream>
using namespace std;
int main()
{
cout << "Enter something:" << endl;
int x;
cin >> x;
cout << "You entered data" << endl;
}
Suppose that I have a text file,... (5 Replies)
Discussion started by: Chris J
5 Replies
4. Shell Programming and Scripting
I have a script that is working when I input parameters from the command line. I was under the assumption that i could use a redirect for the input.
script fred.sh:
value1=$1
value2=$2
print $value1 $value2
Running from command line:
fred.sh 1 2 1 2
Contents of file fred.txt:... (3 Replies)
Discussion started by: djm2112
3 Replies
5. Shell Programming and Scripting
I'm trying to run the logic below but get a `<' is not matched error message when I return a Y or y;
printf "Run this ? : "
read RESP
case $RESP in
Y|y)
cat <<EOF > file
today is Monday
EOF ;;
N|n)
exit 1 ;;
esac
Any ideas? (2 Replies)
Discussion started by: h8mmer
2 Replies
6. Shell Programming and Scripting
Hello friends,
I want a command to print the reult files from find command into a text file.:)
Iam looking from forum memebers. PLZ help me.ASAP
Thanks in Advance,
Siva Ranganath CH (5 Replies)
Discussion started by: sivaranga001
5 Replies
7. UNIX for Advanced & Expert Users
Hi All,
Sorry if the title is not good but I did not know how to explain with only some words!
What I meant is: I have a unix command built from a private application vendor that when executed it prompts for two entries by the keyboard, let's say, for example:
... (1 Reply)
Discussion started by: felipe.vinturin
1 Replies
8. Shell Programming and Scripting
not required this time (6 Replies)
Discussion started by: Sandeep_Malik
6 Replies
9. UNIX for Dummies Questions & Answers
I have a program that is reading strings into a vector from a file. Currently I am using this command:
a.out < file1
The program runs and prints the contents of the vector to the screen, like its supposed to. The problem is that it needs to read in 3 files to fill the vector. Is there anyway... (4 Replies)
Discussion started by: Matrix_Prime
4 Replies
10. Shell Programming and Scripting
I'm trying to write a simple script program (C shell). I have a problem redirecting input into a variable. Say I have a variable called J, and there is file called result which contains just some number, say 5. Which command should I use to assign J value 5 from the file result. I tried the... (2 Replies)
Discussion started by: artur80
2 Replies