Search Results

Search: Posts Made By: odashe
21,895
Posted By odashe
# script1 tmp=`script2 $1 $2` RESULT=$? if...
# script1
tmp=`script2 $1 $2`
RESULT=$?
if (($RESULT != 0 )) then
exit $RESULT
fi
set $tmp
print $1 $2 $3


#script2
if [[ $TEST = "" ]] then
print myparms $1 $2
else
exit 1
fi
...
4,321
Posted By odashe
Does it have to be shell script or you can use...
Does it have to be shell script or you can use Perl?
5,821
Posted By odashe
I beleive in Perl it would be if...
I beleive in Perl it would be

if (/\.\/(.+):.*BL(.*)/) {
$mytext = $1;
$mydate = $2;
}


in sed the syntax will be slightly different:
/\.\/(.+):.*BL(.*)/p $1 $2
but this I did not...
21,895
Posted By odashe
You could "print" the value to the standard...
You could "print" the value to the standard output in script 2:
print $PID or echo $PID
In script1 get it to a variable:
tmp=`script2 p1 ...`
The tmp variable will have your value....
Forum: Open Source 01-10-2008
338,980
Posted By odashe
Vi is the most popular editor for two reasons, as...
Vi is the most popular editor for two reasons, as I see it.
1. (And this reason is respectful) vi can be found in almost all environments.
2. (This reason should not exist if we were honest and...
5,509
Posted By odashe
It is a symbolic link, i.e. a file containing a...
It is a symbolic link, i.e. a file containing a name the link points to. That file might be deleted, but the link remains intact. Delete the link or move it to another directory and try again.
22,320
Posted By odashe
Use -d option with perl: perl -d...
Use -d option with perl:
perl -d <myprogram>
5,509
Posted By odashe
Check what is the "usage" file. What are its...
Check what is the "usage" file. What are its permissions?
2,603
Posted By odashe
If I understand your question you need df or du...
If I understand your question you need df or du command.
20,929
Posted By odashe
Try sed -e 's/$/hour:min/' InFile >OutFile ...
Try
sed -e 's/$/hour:min/' InFile >OutFile

I have not worked with ex, but it looks like you meant that it was adding in the beginning, not in the end, to add in the end use the same construction...
16,730
Posted By odashe
Try du and sort.
Try du and sort.
2,649
Posted By odashe
if [[ $loginID != "" ]] then /usr/ucb/sed...
if [[ $loginID != "" ]]
then
/usr/ucb/sed '/^'$loginID'/d' /user/file1 > /tmp/tmp1
mv /tmp/tmp1 /usr/file1
fi
or
/usr/ucb/sed '/^'$loginID'/d' /user/file1 > /tmp/tmp1
if [[ ! -s...
1,869
Posted By odashe
"Hands-On KornShell Programming" by Rosenberg ...
"Hands-On KornShell Programming" by Rosenberg
"Learning the Korn Shell" by Rosenblatt
14,106
Posted By odashe
Why do you put the pattern in parantheses? Try...
Why do you put the pattern in parantheses?
Try ($ev_time,$rol)=split /\./,$inputfile;
And I beleive that $inpfile is a string containing you value. True?
23,689
Posted By odashe
There is a nice command "apropos" that lists man...
There is a nice command "apropos" that lists man pages if you do not know the exact name. Try for example "apropos directory".
You will get a long output, so it would be better to limit it to...
3,705
Posted By odashe
It always pays to read man pages: man ksh. This...
It always pays to read man pages: man ksh. This will be your reference for future, but it is not an easy way to learn scripting.
I can suggest either of these:

Rosenblatt, Bill "Learning...
Forum: AIX 08-21-2005
12,803
Posted By odashe
Sorry, I did not quite understand your problem. ...
Sorry, I did not quite understand your problem.
You have two file systems mounted in the direcories sapdata1 and sapdataA which are in the directory /oracle/dir1, right?
Both sapdata1 and sapdataA...
2,628
Posted By odashe
It's pretty weird. Is there anything else in...
It's pretty weird.
Is there anything else in the script between the lines you have typed? I mean could it be that the variable is not known when fireit is executed.

Why would not you run your...
7,237
Posted By odashe
I did not quite understand what you mean by "to...
I did not quite understand what you mean by "to hide the login name and password ....during FTP ....in the script.."
I think that it is not safe and that's why it is not easy.
May be you could use...
3,971
Posted By odashe
Try this: perl -e...
Try this:

perl -e 'while(<>){s/(.{35})/$1\n/g; print;}' myfile > result


Explanation (in case you are not familiar with Perl):

while(<>) starts a loop on every line of standard input...
11,689
Posted By odashe
In Korn Shell you can use the set command: ...
In Korn Shell you can use the set command:

spd01: /home/obd/tst > set $(echo george bush)
spd01: /home/obd/tst > print $1
george
spd01: /home/obd/tst > print $2
bush
spd01: /home/obd/tst >
...
4,639
Posted By odashe
Sorry, in my previous post I did not mention that...
Sorry, in my previous post I did not mention that youhave to read without waiting for the opertion to complete.
4,639
Posted By odashe
I did not quite understand how free are you to...
I did not quite understand how free are you to interfere with the file.
If you cannot catch it when it is written, may be you could pipe the output of "tail -f file1" to the program in C that would...
4,657
Posted By odashe
I had similar problem once. I have created a...
I had similar problem once. I have created a script doing the work and then a short C program that was setting UID to root and executing the script. The compiled progam should be owned by root and...
13,663
Posted By odashe
You could use the tail command. But to get lines...
You could use the tail command. But to get lines counted from the beginning of the file specify the line number with the '+' sign:
tail -n +123456789 myfile.
To get just one line pipe it to "head...
Showing results 1 to 25 of 31

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