Search Results

Search: Posts Made By: spider-man
2,544
Posted By spider-man
nvm, it works now. lol I changed $c_file...
nvm, it works now. lol

I changed
$c_file < $in_file >> tempFile.out
back to
$c_file < $in_file > tempFile.out

It works!!!
2,544
Posted By spider-man
yup, it created tempFile.out Let me give you...
yup, it created tempFile.out

Let me give you an example:
I have two .in files
%cat hi.in
abc

%cat bye.in
def
the tempfile will end up containing:
abcdef
after two loops.

It seems...
2,544
Posted By spider-man
I changed to code to what you wrote. it's...
I changed to code to what you wrote.

it's actually created a new file called ".out"

It doesn't seems to be overriding the .out
It seems like it's adding more inputs to the .out file for each...
2,544
Posted By spider-man
Shell Script - File Input/Output in C
This is part of my code:


for in_file in $1/*.in # list of all .in files in working directory.
do
$c_file < $in_file > "$tempFile.out"
...
1,486
Posted By spider-man
Alright. I shouldn't worry so much about this. ...
Alright. I shouldn't worry so much about this.
:)
1,486
Posted By spider-man
I might get into trouble for posting.
I might get into trouble for posting.
1,486
Posted By spider-man
Remove this thread
Please remove this thread.

https://www.unix.com/homework-coursework-questions/207877-shell-script-beginner.html#post302735171
1,742
Posted By spider-man
Simple Shell Scripting
1. The problem statement, all variables and given/known data:

An argument example:
../path/cse/lab3/remove

Right now, it's printing out all the directory and files in 'lab3'.
I want it to...
2,121
Posted By spider-man
Ok, I get you. If I test -d and test -f,...
Ok, I get you.

If I test -d and test -f, and fail, how can I tell if the path takes me to a file or a directory?
Because for the error message, I need to say something like:

echo "File...
2,121
Posted By spider-man
Shell Script - (File and Directory)
1. The problem statement, all variables and given/known data:


My problem is that when I made up a non-existing directory, it prints out "hiii". It didn't enter the first if statement. It works...
1,502
Posted By spider-man
Shell Script - (file and directory)
The question is here:
http://farm9.staticflickr.com/8065/8217767191_2154e64904_b.jpg


My problem is that when I made up a non-existing directory, it prints out "hiii". It didn't enter the first...
2,615
Posted By spider-man
Thank you for helping me. compare files: I...
Thank you for helping me.

compare files:
I mean I'm given the path to a directory. How do I go into the directory, and how can I tell it's a .in file and find a corresponding .out file?



I...
2,615
Posted By spider-man
Shell Script (beginner)
1. The problem statement, all variables and given/known data:
Arguments:
http://farm9.staticflickr.com/8070/8212131370_8b6e8c10c5_c.jpg

I am given these three arguments. $1, $2, $3
The first...
Forum: Programming 11-23-2012
2,419
Posted By spider-man
Yup, what Don said. It's called promotion and...
Yup, what Don said.
It's called promotion and type casting.
be careful with it.
Forum: Programming 11-23-2012
2,851
Posted By spider-man
Isn't just this?: printf("%lf",...
Isn't just this?:
printf("%lf", floatNumber);
Forum: Programming 11-23-2012
1,480
Posted By spider-man
hmm, when input is not 1 or 2, it seems like the...
hmm, when input is not 1 or 2, it seems like the while loop is true.
It looks right to me...
3,609
Posted By spider-man
In shell scripting the end an if, use: fi
In shell scripting
the end an if,
use: fi
7
2,251
Posted By spider-man
That is correct. You need single quotes around ...
That is correct. You need single quotes around
grep 'BC(A)\{2,6}' filename
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy