Search Results

Search: Posts Made By: RishiPahuja
53,645
Posted By RishiPahuja
any workaround?
IS there no Patch/fix/workaround.?...If I have to look at file with large contents....i feel miserable with small window browing left & right.
53,645
Posted By RishiPahuja
Terminal too wide
Hi Experts,

It may be a trivial thing, but I am stuck. Whenver I try to open a file using vi I get error Terminal Too wide.

I am using putty to connect to a Sun OS.

Please advice.
...
3,366
Posted By RishiPahuja
One way to do this via sftp is sftp -b...
One way to do this via sftp is


sftp -b $SERVER_NAME << EOF
get file1
get file2
.....
EOF

If you do not have ssh key stored between two servers it will prompt you for password. Also not...
33,710
Posted By RishiPahuja
for instance I tried ssh -T $IP "passwd...
for instance I tried

ssh -T $IP "passwd oracale"

but unfortunately this prompts for new password, which i dont want and I want to pass the new password as argument to script itself.
33,710
Posted By RishiPahuja
using ssh change password remotely?
Is it possible to change the password using a shell script, I want to remotely connect to a computer and then change password without manual intevention.

Thanks in Advance
Rishi
25,640
Posted By RishiPahuja
Depend on what you want to do with the stripped...
Depend on what you want to do with the stripped array:
for simple usages cut is good enough : cut -d" " f1,2,3 $your_string
9,526
Posted By RishiPahuja
Try something like while read line do ...
Try something like

while read line
do
#assuming the field is column X in each record with total N records
precolumns=`echo $line | cut -d',' f1,2,3,4,....X-1`
postcolumns=`echo $line | cut...
14,298
Posted By RishiPahuja
I doubt if grepping is the efficient way here as...
I doubt if grepping is the efficient way here as there are million of records. Why not use the sed approach, which as I understand will not require scan the whole file when you are only interested in...
14,298
Posted By RishiPahuja
Try this for filename in `ls -1 ...
Try this

for filename in `ls -1 *aaa_ddd_ccc_ddd.txt`
do
sed -e '$d' $filename > /tmp/tmpfile
mv /tmp/tmpfile $filename
done


This assumes your trailer is last line always!
23,270
Posted By RishiPahuja
Excel macros won't help here as I believe you are...
Excel macros won't help here as I believe you are going to mail in csv format to a list of people. Not sure if you really can embed a macro in your csv.

If its going to be only on a specific...
1,894
Posted By RishiPahuja
As you suggest that the log file is only...
As you suggest that the log file is only generated when there is a Failure..you could run a daemon something like


while (1)
do
if [ -f $path2file ]
cat $path2file | mailx -s "Failure Alert"...
23,270
Posted By RishiPahuja
can you paste some sample from your file and the...
can you paste some sample from your file and the way you want it to be formatted?
78,406
Posted By RishiPahuja
Try this out :%s/abc\//abc\/data/g
Try this out

:%s/abc\//abc\/data/g
2,733
Posted By RishiPahuja
Still its not very clear what exactly you want to...
Still its not very clear what exactly you want to do:

Assuming your database is in /opt/informix and you dont want users belogning to group xyz should get even read access to this directory. The...
25,680
Posted By RishiPahuja
This works fine for me. > more a1.txt 1 ...
This works fine for me.

> more a1.txt
1
2
3
4
5
> cat a1.txt | sed -e '1 i\ newLine' > newa1
> more newa1
newLine
1
2
3
4
5

Please check if "-e" is the correct parameter for...
1,882
Posted By RishiPahuja
try this snippet : if [ -z $w ]; then ...
try this snippet :

if [ -z $w ]; then
echo "W is null"
else
echo "W has some value"
fi
2,075
Posted By RishiPahuja
put the alias command in your .bashrc or...
put the alias command in your .bashrc or .bash_profile under your home directory.
4,581
Posted By RishiPahuja
Try something link: cat <file> | grep ^/
Try something link:
cat <file> | grep ^/
23,908
Posted By RishiPahuja
This should do: find $DIR -name "*.log" -exec...
This should do:
find $DIR -name "*.log" -exec rm -rf {} \;
8,439
Posted By RishiPahuja
May be there could be some more simpler way to...
May be there could be some more simpler way to get it done, but as of now all i could think of is something like

ls -l | sort -rd | awk '{ print $9 }'

Rishi
8,588
Posted By RishiPahuja
In case of Apache, all the requests are logged...
In case of Apache, all the requests are logged under
$INSTALL/logs/access_log.<TimeStamp>

By default the log level is set to warn (medium) in http.conf.
You can increase to get all requests. I...
34,292
Posted By RishiPahuja
In home directory for every user you will find...
In home directory for every user you will find different profile files for different shells.

example:
-> Bash : .bash_profile
-> KSH : .profile

You can modify these to suit your requirments.
34,283
Posted By RishiPahuja
A way to debug the problem is run the script in...
A way to debug the problem is run the script in debug mode using -x

eg ksh -x script

As script is a piece of interpreted code as the execution flows you will be able to located where the...
14,089
Posted By RishiPahuja
try "netstat"
try "netstat"
Forum: SCO 12-14-2005
14,186
Posted By RishiPahuja
When you say .profile it say to spawn a new...
When you say
.profile
it say to spawn a new child shell and execute the script.
while when u say
. ~/.profile
it means you are executing the script in present shell.

say if you have any...
Showing results 1 to 25 of 202

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