Search Results

Search: Posts Made By: moshe fried
2,231
Posted By moshe fried
try if [ $# != 2 ] instead of if [ ! $# = 2 ]
try if [ $# != 2 ] instead of if [ ! $# = 2 ]
1,882
Posted By moshe fried
unzip problem
Hi,
Your problem is caused you don't have enough diskspace either where you are unpacking the package or in the temporary drive used by unzip. Check for a file system with enough disk space and...
15,302
Posted By moshe fried
Missing '$'
Hi,
In the division statements the test1 variable is missing the '$' sign.
Moshe
22,268
Posted By moshe fried
Which shell is the default shell that u are using?
if it's not ksh, then a lot of the commands in the .kshrc make it invalid, also did you try using the '.' as I mentioned.
I see the first script starts with ':' meaning that it is the regular shell....
33,043
Posted By moshe fried
the problem is the input not the output
Since awk has limitations of the size of input it can take in one line try the following:
cat sql.txt | perl -e 'print (split (/#/,$_))[1]'
split works like the FS of awk, but the field count...
10,896
Posted By moshe fried
[ ! -z `./qmhandle -s | awk '($3 == "local" &&...
[ ! -z `./qmhandle -s | awk '($3 == "local" && $NF > 10) || $3 == "remote" && $NF > 1000) {print "mail"}` ] && mail ....
22,268
Posted By moshe fried
First I would check permissions of the .kshrc...
First I would check permissions of the .kshrc file to make sure it can be executed
Second. why don't you call the .kshrc file in the .profile with
. .kshrc
2,957
Posted By moshe fried
This might work: su - linus -c "rsh -l linus...
This might work:
su - linus -c "rsh -l linus psmf ORACLE_SID=SMP;export ORACLE_SID;sqlplus uname/passwd@PSMF.world > in/tmp/sars-sql << EOF_SQL
select * from name;
EOF_SQL"

Moshe
Forum: Programming 02-21-2007
9,971
Posted By moshe fried
A program that shows padding issues and offsets
Hi,
When working in many client/server situations that data being passed is passed in data structures. It's important to know the padding arrangements between two architects, so here is an example...
8,614
Posted By moshe fried
Here is a script that you can use in perl based on the file's timestamp
#!/usr/bin/env perl


die "Syntax: $0 directory" if (@ARGV != 1 || ! -d $ARGV[0]);
$TwoMonths = 60 * 60 * 24 * 60; # Seconds in two months (+/-)
$Dir = $ARGV[0];
die "Can't open directory $Dir...
3,168
Posted By moshe fried
for use in bash try:
"(FILES=$(find ....) ; [ -z \"$FILES\" ] || tar ....)"
Forum: Programming 02-13-2007
2,186
Posted By moshe fried
If your question is what I think it is, if your...
If your question is what I think it is, if your proccess is within a system call or a library call, the signal can stop that call, and the call will return an error usually. Then you can check if the...
8,614
Posted By moshe fried
A simple method with find would be: find...
A simple method with find would be:
find dirname -mtime +60 -print
will give you all files and directories modified more than 60 days ago.
3,168
Posted By moshe fried
you can still use the except module and write the...
you can still use the except module and write the following:
if the default shell is ksh
"(FILES=$(find ....) ; [[ -z $FILES ]] || tar ....)"
2,641
Posted By moshe fried
Hi Manikumar, can you truss the command and...
Hi Manikumar,
can you truss the command and please send to me the output.
Moshe
2,771
Posted By moshe fried
are you able to read old tapes?
are you able to read old tapes?
5,898
Posted By moshe fried
it seems to be an oracle problem, which can be...
it seems to be an oracle problem, which can be for many reasons.
I would advise you to try two things. first if you have truss run the command when running the process.
Secondly if you are using a...
3,359
Posted By moshe fried
can you please send me the piece of code?
can you please send me the piece of code?
8,381
Posted By moshe fried
Don't you mean that NF > 0. Also I would change...
Don't you mean that NF > 0. Also I would change it slightly to be more robust
awk 'NR > 1 && NF == 3 { print $0 > $1".txt"}' this will also take care of usual garbage input lines
3,168
Posted By moshe fried
Thanx! Whoops sorry, my perl background is...
Thanx!
Whoops sorry, my perl background is showing:-)
42,067
Posted By moshe fried
NR versus ++
NR is the current Number of record, in other words the line number of the file. When adding this you are not counting the occurrences but the positions in the file
50,891
Posted By moshe fried
for those without gnu tar
save file list in variable or file.
FILES=$(find ...)
or
find ... > /tmp/$(USER).flist.$$
then you can remove the files after the tar, without running find twice, (which might be a heavy process...
15,302
Posted By moshe fried
The problem might be somewhere else
try printing the $line value after reading from RR, see if anything is being read from the file. If so, try also printing the array after the split with:
print "line is $line\nFields are:\n". join...
3,168
Posted By moshe fried
running command on condition
I assume you don't want the file to be created if no files are given.
$(FILES)=$(find .....)
[[ -z $FILES ]] || tar ... $(FILES)
Showing results 1 to 24 of 24

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