Search Results

Search: Posts Made By: aashish.sharma8
3,846
Posted By aashish.sharma8
Could you calculate the number of lines added to...
Could you calculate the number of lines added to log file every day ?
Then you can use csplit to split the file and delete the the other one.
10,174
Posted By aashish.sharma8
sftp $USER1@$SERVER <<ENDofFTP...
sftp $USER1@$SERVER <<ENDofFTP 2>>/ab/cd/yourErrorfile
9,498
Posted By aashish.sharma8
sed 's/Â//g' a.html or cat a.html | tr -d...
sed 's/Â//g' a.html

or
cat a.html | tr -d "Â"
4,087
Posted By aashish.sharma8
while read line do file=`basename $line` ...
while read line
do
file=`basename $line`
echo $file
done < yourfilename


assuming you need all file names irrespective of extension type.
1,729
Posted By aashish.sharma8
1) *.root means any string ending with "root"...
1) *.root means any string ending with "root" after "."
2) "*root" means any string ending with "root"

create 2 files a) abcroot and b) abc.root
and note the difference in both commands
1,295
Posted By aashish.sharma8
are you executing this script from the directory...
are you executing this script from the directory of SystemOut.log file ?
Any errors ?
7,991
Posted By aashish.sharma8
Please refer to :- ...
Please refer to :-
https://www.unix.com/shell-programming-scripting/200533-solved-moving-multiple-files-mv.html
1,142
Posted By aashish.sharma8
could you please post some records of your file. ...
could you please post some records of your file.
Is Model_Type value needs to be passed as parameter ?
Forum: Red Hat 09-25-2012
5,192
Posted By aashish.sharma8
Hi Naveen, I am not very familiar with swap but...
Hi Naveen,
I am not very familiar with swap but I think top or topas command's will give you the process which is taking most of the CPU
22,734
Posted By aashish.sharma8
Ah..Great... Thanks Corona...learnt something...
Ah..Great...
Thanks Corona...learnt something new today !!
22,734
Posted By aashish.sharma8
Thanks msabhi...prior to this example I was...
Thanks msabhi...prior to this example I was assuming that it is not possible to use shell commands inside sed.
Could you please tell about some shell commands that could be used inside sed ?
22,734
Posted By aashish.sharma8
for fname in `find . -name "xldn*bap.orig.new"` ...
for fname in `find . -name "xldn*bap.orig.new"`
do
fname1=`basename $fname | cut -d"." -f1`
fname2=$fname1".orig"
mv $fname $fname2
done
4,349
Posted By aashish.sharma8
ls test.dat | wc -l This will give you...
ls test.dat | wc -l


This will give you the count of occurances of the file.
If it returns zero then no file present.
1,942
Posted By aashish.sharma8
use below code to trace error. Seems like...
use below code to trace error.
Seems like sqlplus is unable to connect to database may be some issue with userid/password or SID.

sqlplus -s name/pass@schema<<EOF 1>error.txt
your query..
EOF
...
4,058
Posted By aashish.sharma8
Thanks for update...Rather than using ftp for...
Thanks for update...Rather than using ftp for each file why don't you zip all the files together and ftp the compressed file only.
This will be much more effective !
5,261
Posted By aashish.sharma8
You may call the mysql in silent mode , i think...
You may call the mysql in silent mode , i think its -s option.

Theny just trigger a simple select satement like select sysdate and redirect the output to a file.

After 10s check if this file...
1,516
Posted By aashish.sharma8
You have already started !! All you need is...
You have already started !!

All you need is to have patience - This is not a subject to learn in a day !!

Just keep looking and understand what problems other's are facing and try to come up...
4,058
Posted By aashish.sharma8
Hi , Have made some changes in the code and...
Hi ,
Have made some changes in the code and below is working fine for me.


#!/bin/ksh
ARCH_SERVER=xxxxxx
ARCH_USERID=xxxxxxx
ARCH_PASSWORD="xxxxxxx"
REMOTE_DIR=xxxxxxx...
4,058
Posted By aashish.sharma8
you may use basename $FILE # This will give...
you may use

basename $FILE # This will give you the filename onle



for LOOK_DIR in /TempFiles
do
for FILE in `find ${LOOK_DIR} -mtime -30 -exec ls {} \;`
do
echo ${FILE} >> file_list...
3,675
Posted By aashish.sharma8
Hi Murali, Scripts are killing all the...
Hi Murali,

Scripts are killing all the processes mentioned in the text file except the Genesis processes.
Scripts are written assuming you have the list of processes to be killed in a file.
...
2,928
Posted By aashish.sharma8
could you please post your sample data and the...
could you please post your sample data and the output you desire ?
3,223
Posted By aashish.sharma8
lines=(`grep '404' $1 | cut -d" " -f5`) ...
lines=(`grep '404' $1 | cut -d" " -f5`)

Remove the brackets.
2,928
Posted By aashish.sharma8
use head and tail commands to get the desired...
use head and tail commands to get the desired results.

last line : tail -1 filename.txt
line before the last : tail -2 filename.txt | head -1

You can also use sed to go to any perticular line.
21,470
Posted By aashish.sharma8
HI , you may define the username and password in...
HI , you may define the username and password in profile and make it restricted.
Then you may use the variables against the username/password.

But I am sure that others on this portal may come...
1,058
Posted By aashish.sharma8
if [[ "$PUB_FILES_PRESENT" = "0" ]] then ...
if [[ "$PUB_FILES_PRESENT" = "0" ]]
then
echo "no"
else
echo "yes"
fi


OR-------------

if [ $PUB_FILES_PRESENT -eq 0 ] #when you are comparing a variable
then
echo...
Showing results 1 to 25 of 40

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