Search Results

Search: Posts Made By: srikanthus2002
8,921
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...
56,464
Posted By srikanthus2002
is it home work
is it home work
14,782
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,417
Posted By srikanthus2002
can you try with tail -3
can you try with tail -3
1,971
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 ]
...
5,209
Posted By srikanthus2002
why don't you compare size of the files
why don't you compare size of the files
14,318
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,405
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,467
Posted By srikanthus2002
Better to search first in forum before posting..
Better to search first in forum before posting..
42,443
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,854
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,934
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,978
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,484
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`
2,186
Posted By srikanthus2002
try this: cat file_name |grep "CUST" | awk...
try this:

cat file_name |grep "CUST" | awk '{print $1 " AKASH " $3}'
3,484
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,484
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,449
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....
5,343
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,449
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...
68,914
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,781
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,620
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,248
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
15,323
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 08:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy