Search Results

Search: Posts Made By: srikanthus2002
8,586
Posted By srikanthus2002
Telnet to router and execute command
I am trying to write a shell script to execute some commands..

telnet <IP address of the router>
wait 10
echo "username"
echo "password"
sh log
exit

but i am unable to execute it properly...
40,766
Posted By srikanthus2002
is it home work
is it home work
13,876
Posted By srikanthus2002
yes, you can open script file in any text editor....
yes, you can open script file in any text editor.

if you want to save it as text file then put extension .txt (filename.txt)
2,326
Posted By srikanthus2002
can you try with tail -3
can you try with tail -3
1,788
Posted By srikanthus2002
#!/bin/sh CURDIR=/home/user/folder ls -1...
#!/bin/sh
CURDIR=/home/user/folder

ls -1 *.dat > $CURDIR/dat_fiels
for i in `cat $CURDIR/dat_fiels`
do
echo $i | cut -d"." -f1 | grep "[0-9]" 1> /dev/null
if [ $? -eq 0 ]
...
4,707
Posted By srikanthus2002
why don't you compare size of the files
why don't you compare size of the files
14,052
Posted By srikanthus2002
you have to configure rsh service in destination...
you have to configure rsh service in destination server that source server can do the change in server....


Since am using NCR server , i entered hostname of the source server in /etc/hosts.equiv...
5,069
Posted By srikanthus2002
you can use rcp command rcp file_name...
you can use rcp command

rcp file_name server_name(or IP address):/home/path
2,300
Posted By srikanthus2002
Better to search first in forum before posting..
Better to search first in forum before posting..
41,930
Posted By srikanthus2002
try this ---------------------- ...
try this
----------------------
CURRENDIR=/home/anupl/sri

cd $CURRENDIR
rm $CURRENDIR/zipfiles 2>/dev/null

ls -1 *.zip
if [ $? -eq 0 ]
then
echo ".zip file found"
ls -1...
4,596
Posted By srikanthus2002
use it echo "enter file name" read file_name...
use it
echo "enter file name"
read file_name
mkdir ${file_name}"_bdump"
mkdir ${file_name}"_cdump"
mkdir ${file_name}"_udump"

As lorcan said ,can you provide more details...
10,614
Posted By srikanthus2002
isql database_name <<! select * from table_name...
isql database_name <<!
select * from table_name
!

you can try this logic if you are using infomix
16,220
Posted By srikanthus2002
Administrator sets format (ASCII/BIN) on FTP...
Administrator sets format (ASCII/BIN) on FTP server.

you can switch what ever you want...by asc and bin command

asc for ASCII
bin for Binary
3,205
Posted By srikanthus2002
cat(print) the file and assign it to variable ...
cat(print) the file and assign it to variable

Variable=`cat file_name`
1,970
Posted By srikanthus2002
try this: cat file_name |grep "CUST" | awk...
try this:

cat file_name |grep "CUST" | awk '{print $1 " AKASH " $3}'
3,205
Posted By srikanthus2002
try this 1. "dropdb | tee file_name" ...
try this

1. "dropdb | tee file_name"


2. dropdb > /home/sir/file_name 2>&1

#Here stand error and stand out get sent to the o/p file i.e. file_name

in both the cases message will be...
3,205
Posted By srikanthus2002
Answer for question number 2, you can save...
Answer for question number 2,

you can save the variable by usning "tee" command or redirect options..

1. command | tee

2. 2>&1 ( redirect stdout and stderr )
5,242
Posted By srikanthus2002
there is no meaning for S11 or S12 ... this is...
there is no meaning for S11 or S12 ...
this is for just file representation....
4,902
Posted By srikanthus2002
Can you confirm the following info... 1....
Can you confirm the following info...

1. Have you entered windows host in /etc/hosts file
2. and /etc/hosts.eqiv or relevent files

check the same.

It might also be port issue( rsh port).
5,242
Posted By srikanthus2002
uname -a server server 4.0 3.0 3516 Pentium...
uname -a
server server 4.0 3.0 3516 Pentium IV(TM)-ISA/PCI

I am using NCR UNIX

Go to "/etc/rc2.d " direcotry and create a file as "S11file_name"

file name should be started with "S and two...
67,732
Posted By srikanthus2002
if [ "x $value" == "x """ ] #if [ ! -n "$value"...
if [ "x $value" == "x """ ]
#if [ ! -n "$value" ]
then
echo "empty"
else
echo "Not empty"
fi

try it out..
3,478
Posted By srikanthus2002
you can try this logic while : do ls...
you can try this logic

while :
do
ls -lrt | tail -1
echo # process them what ever you want
sleep 10
done

it takes last file only since i used "tail -1" command


some friends may come...
2,491
Posted By srikanthus2002
FILE=/home/dir/ss cat $FILE | cut -d"=" -f2...
FILE=/home/dir/ss

cat $FILE | cut -d"=" -f2 >/home/dir/ss/sss

for i in `cat /home/dir/ss/sss`
do
echo -n $i
done

You can try above code
3,071
Posted By srikanthus2002
used following command for informix database. ...
used following command for informix database.

unload to /home/sri/file_name.unl select * from table.name >> query.sql

then run this (query.sql
14,816
Posted By srikanthus2002
sed "s/$past/$pres/" $fileName > fileMod use...
sed "s/$past/$pres/" $fileName > fileMod

use single code '

sed "s/'$past'/'$pres'/" $fileName > fileMod

try this ...
Showing results 1 to 25 of 158

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