Hi, everybody. I invoked shell command by Process class of java and it gave "stty: standard input: Invalid argument" no matter the command is right or wrong (normal output of shell command is shown too). If I run the shell command in shell, no such error message shows. I can't figure out why.
Command is something lik this {"/bin/csh", "...
I need to open a file using c shell. The file contains a single integer, and I need to put it into a variable, increase it and put back into the file. Meaning, if the file contains the number 5, I need, after the program runs, that the file contains the number 6. Any suggestions?
...
We have Oracle running on Solaris, and the shell is by default csh. So the login script sets the oracle_home, oracle_sid in csh also. But I don't like csh and want to use bash to do my work. So how to source the csh login script in bash?
e.g, the following is what in the .cshrc file. And when use bash, I'd like use these variables. One ...
Hello,
I am trying to change the content of a specific line in a batch of files. I thought that would be a piece of cake but for some reason, nothing happens, so I guess I am missing something.
Line 8 should have been replaced.
Here the csh script I used:
#!/bin/csh
#
# replace context in line xxx by yyy
# 2010/05/07
set files = `ls ...
I have a C shell script that does something like this:
#!/bin/csh
gcc example.c -o ex
gcc combine.c -o combine
ex file1 r1 <-- 1
ex file2 r2 <-- 2
ex file3 r3 <-- 3
#... many more like the above
combine r1 r2 r3 final
\rm r1 r2 r3
Is there some way I can make lines 1, 2 and 3 run in parallel instead of one after the anothe...
hello, I've got some problem, I have list of data in the file:
053-37878 03828008 Moskovitch James 500
052-34363 01234567 Mendelson Kippi 450
053-32322 03828008 Jameson Shula 350
054-39238 03333333 Merden Moshe 300
is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advanc...
I'm working with C-Shell, I'm trying to run this script
set callsTo = "`cut -d" " -f2 ${1}`"
echo $callsTo
cut receives data from the file which is the first parameter:
> ./myscript data
I need only second field from every row: -f2.
After that I want to check if the data was stored, but I receive or an error unmatched . or empty r...
I'm trying to read first row from the file
> source ./rank file
using this script
set line = ($<) <- inside rank
but when I enter
echo $line I receive nothing, how can I change it? thanks in advance
...
I wrote simple script test
echo hello #<-- inside test
if I press one time enter after hello, my script will run, if I don't press - it will not, if two times I'll receive my hello and + command was not found, can somebody please explain me this behavior thanks in advance
This is not a part of the code, this is actual code
and I r...
can somebody explain me what does this error mean:
> ./rank lines.in
'nknown option: `-
Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
this is my script rank:
#! /bin/tcsh -f
set line = `cat ${1}`
echo $line
I think that the problem I have is with first row #! /bin/tcsh -f
I'm working on Windows! but after I wrote script on ...
can somebody help me, how can I filter my file, inside the file I have rows with 3, 4, 5 elements, I want print using echo only these which have 5 elements, thanks in advance (I'm talkin about scripts)
...
I need to transfer data via pipe and also transfer file with this data, can I do something like this inside the script?
cat ${1} | ./helper ${1}
and what is the difference if I write
cat ${1} | ./helper < ${1}
...
hello, explain me please how exactly pipe works, for example I have this snippet of the code
set line = ($<)
while(${#line} != 0)
if(${#line} == 5) then
echo line | sort | ./calculate ${1}
endif
set line = ($<)
end
I need to choose all rows with 5 words and after sort it and after transfer, but I'm confused, how will it work,...
I'm workin on C-Shell, can somebody help me find the bug, my script:
#! /bin/tcsh -f
cut -d" " -f2 ${1} | ./rankHelper
script rankHelper:
#! /bin/tcsh -f
set line = ($<)
while(${#line} != 0)
cat $line
set line = ($<)
end
file lines from which the data was sent:
053-3787837 038280083
052-3436363 012345678
053-3232287 038280083
05...
I have this snippet of the code:
set calls = `cut -d" " -f2 ${2} | grep -c "$numbers"`
set messages = `cut -d" " -f2 ${3} | grep -c "$numbers"`
@ popularity = (calls * 3) + messages
and error
@ expression syntax
what does it mean? grep -c returns number, am I wrong, thanks in advance
in $numbers I have list of numbers, 2 and ...
hello everyone, can You explain please, can grep pick rows if at least one element from the list appeared, for exmaple
grep "hello world" file1
grep must give me all rows which have or word hello or world or both of them, thanks in advance
...
hello everybody, I've got strange problem with cut
I wrote script, there I have row:
... | cut -d" " -f3,4 >! out
cut recieves this data (I checked it with echo)
James James 033333333 0 0.00
but I recieve empty lines in out, can somebody explain why?
...
hello, I'm writin scripts and I'm very curious, does c-shell have somethin like continue in C, thanks in advance
...
somebody knows what does this error mean?
Missing -. in google I found nothing about this
...
I've got a tcsh shell script that I would like to stop with an error on nonzero status most of the time, but in some cases I want to ignore it. For example:
#!/bin/tcsh -vxef
cp file/that/might/not/exist . #Want to ignore this status
cp file/that/might/not/exist . ; echo "this doesn't work"
cp file/that/must/exist . #Want to stop if th...