Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: moshe fried
2,041
Posted By moshe fried
try if [ $# != 2 ] instead of if [ ! $# = 2 ]
try if [ $# != 2 ] instead of if [ ! $# = 2 ]
1,699
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...
14,915
Posted By moshe fried
Missing '$'
Hi,
In the division statements the test1 variable is missing the '$' sign.
Moshe
20,617
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....
30,979
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...
9,849
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 ....
20,617
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,648
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,343
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...
7,064
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...
2,871
Posted By moshe fried
for use in bash try:
"(FILES=$(find ....) ; [ -z \"$FILES\" ] || tar ....)"
Forum: Programming 02-13-2007
1,935
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...
7,064
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.
2,871
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,460
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,509
Posted By moshe fried
are you able to read old tapes?
are you able to read old tapes?
5,775
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,103
Posted By moshe fried
can you please send me the piece of code?
can you please send me the piece of code?
7,827
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
2,871
Posted By moshe fried
Thanx! Whoops sorry, my perl background is...
Thanx!
Whoops sorry, my perl background is showing:-)
33,699
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
45,790
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...
14,915
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...
2,871
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

 

Featured Tech Videos

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