Search Results

Search: Posts Made By: akshay61286
Forum: Web Development 02-05-2010
2,891
Posted By akshay61286
Hi you may use the following in a script :- ...
Hi
you may use the following in a script :-
mysql -u root -p<ur password> -e "drop database test"

cheers
13,256
Posted By akshay61286
Hi, First of all congrats on taking ur steps...
Hi,
First of all congrats on taking ur steps down the cloud path
I have been using AWS for the past 6 months now. The services are smooth, though i tend to lose network connectivity now and then...
1,608
Posted By akshay61286
Hi it would be helpful if u could throw some...
Hi

it would be helpful if u could throw some more light on ur problem :D

cheers
1,308
Posted By akshay61286
hi find . -name "file.sh" -print 2>/dev/null ...
hi
find . -name "file.sh" -print 2>/dev/null

cheers
5,978
Posted By akshay61286
hi, use : which <your script> this...
hi,

use : which <your script>

this assumes that PATH has been exported
cheers
8,054
Posted By akshay61286
Hi how about :- find . -print | xargs...
Hi

how about :-

find . -print | xargs grep -i "search"

cheers
11,781
Posted By akshay61286
Hi, just had a query, suppose the number of...
Hi,

just had a query, suppose the number of files with the current date is large. then in that case you will have to obtain the maximum number by traversing the file names and sorting them to find...
11,781
Posted By akshay61286
hi, i don't know if this will work for you...
hi,

i don't know if this will work for you but had an idea why not store the value of number of files in the dir (ls *.*| wc -l), and append this value to your file name. as a result you will...
5,429
Posted By akshay61286
Hi, add a file for eg .aliases, and define...
Hi,

add a file for eg .aliases, and define all your aliases in this file, then call this file from your .bash_profile(of the user, you r logging in with).

cheers
2,118
Posted By akshay61286
Hi, PATH refers to the locations where your...
Hi,

PATH refers to the locations where your command/script will be searched for execution.
if your script/command doesn't lie in the PATH you have to give the absolute path of the same....
3,367
Posted By akshay61286
hi all, sorry for replaying on this thread...
hi all,

sorry for replaying on this thread again.

but i came across this problem again,

to summarize , binary line of "^@" gets inserted into a file whenever i try to truncate it by >...
4,106
Posted By akshay61286
hi Vinodh, i will appreciate it if you could...
hi Vinodh,

i will appreciate it if you could share your solution.
though i manage a CVS on a RedHat server, and was thinking of looking for the dir CVSROOT on the filesystem, but your solution...
4,487
Posted By akshay61286
hi assumption :- the files are located at...
hi

assumption :- the files are located at /home/akshay/temp/Scripts/


fileLoc="/home/akshay/temp/Scripts/"
while read line
do
temp=$(echo $line | awk -F ',' '{print $1}')
...
15,467
Posted By akshay61286
hi assuming that your file is at...
hi

assuming that your file is at /home/dummy/temp/file1


while read line
do
temp=${line%.}
echo $temp >> /home/dummy/temp/op1
done < /home/dummy/temp/file1


cheers
2,793
Posted By akshay61286
hi , assuming that your file's absolute path...
hi ,

assuming that your file's absolute path is :- /home/dummy/viralnerd.txt
replace the first line as follows :-
fileLoc="/home/dummy/viralnerd.txt"

cheers

ps - remove //initialize this
2,793
Posted By akshay61286
hi, for a more generic script try :- ...
hi,

for a more generic script try :-


fileLoc="" // initialize this
uniqNames=$(cat $fileLoc | awk '{print $1}' | uniq)
for i in $uniqNames
do
grep $i $fileLoc | awk '{print $2}'...
2,099
Posted By akshay61286
Hi All If the list of servers is small, i...
Hi All

If the list of servers is small, i would suggest that you set up passwordless ssh between the servers.
and then use your script without passwords in it.

Cheers
71,462
Posted By akshay61286
Hi why not insert a if block before you copy...
Hi

why not insert a if block before you copy the files ?


if [ ! -d <your dir> ] ; then
mkdir <your dir>
fi


cheers
Forum: Linux 12-08-2009
13,858
Posted By akshay61286
hi i dnt know if you can see a datewise...
hi

i dnt know if you can see a datewise listing of executed commands, but .bash_history (this name may change), present in the home dir of the user lists the last executed commands.
You may use...
4,227
Posted By akshay61286
hi sandeep assuming you have predetermined...
hi sandeep

assuming you have predetermined list of servers , say A,B,C,D you may like to do


servers="A B C D"
for i in $servers
do
for temServer in $servers
do
if [ $i ==...
5,210
Posted By akshay61286
Hi try the following to get the extensions...
Hi

try the following to get the extensions of all the files in a dir


dirLoc="" // initialize this
cd $dirLoc
for FILENAME in `ls`
do
FILEEXTENSION=$(echo $FILENAME | awk -F '.' '{if...
4,227
Posted By akshay61286
Hi the syntax for scp is scp <file...
Hi

the syntax for scp is


scp <file to copied> <location to be copied>


either of the two arguments can be on a remote system
for a remote system the syntax is for the form...
34,920
Posted By akshay61286
Yup as said by jsmithstl, you need to use the...
Yup as said by jsmithstl, you need to use the here doc.

for mysql use :
mysql -u <user> -p<pwd> -e "<your query>"

Cheers
1,547
Posted By akshay61286
hi hope this works ls *.out | sort -n
hi
hope this works

ls *.out | sort -n
4,748
Posted By akshay61286
u may use signal handling for it , try...
u may use signal handling for it ,
try something like :-


errorDebugger(){
set +x
echo "$(date ++%d-%m-%Y_%l:%M:%S) ::: Script :- $0 ::: Line No :- $2 ::: Line ==== $(sed...
Showing results 1 to 25 of 33

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