Search Results

Search: Posts Made By: kesari
1,344
Posted By kesari
Setting up Linux.
Dear Administrators and Moderators,

Normally I use Windows for browsing net, but few days back my pc was affected with virus.
One of my friend suggested me to use Linux for safe browsing.

I...
4,721
Posted By kesari
Assign without space between '=' and '(' ......
Assign without space between '=' and '(' ... var_loop=( $var_loop ) + 1

or use expr to increment the value.
1,883
Posted By kesari
is it 1MB or 1GB? Your script is correctly...
is it 1MB or 1GB?
Your script is correctly getting files >1MB .
2,418
Posted By kesari
You can get the pid using - echo $$ #for...
You can get the pid using
- echo $$ #for current pid
- echo $! # for last command pid
2,131
Posted By kesari
Extract from "man rerurn" exit will cause...
Extract from "man rerurn"

exit will cause the calling shell or shell script to exit
with the exit status specified by n. If n is omitted the
exit status is that of the last command ...
7,057
Posted By kesari
Use double quotes ... echo "Ln = $mline"
Use double quotes ... echo "Ln = $mline"
2,131
Posted By kesari
Use "return" in 2nd script and check the value in...
Use "return" in 2nd script and check the value in main script.

# Main Script
SCRIPT_DIRECTORY/SecondScript.sh
ret=$?
if [ $ret != 0 ]
then
exit 1
fi

#SecondScript.sh
command ......
2,660
Posted By kesari
Use word count (wc) command. wc -l file_name.
Use word count (wc) command. wc -l file_name.
2,785
Posted By kesari
tar -cvf allmyfiles.tar *
tar -cvf allmyfiles.tar *
3,109
Posted By kesari
Thank you radoulov it is sorting correctly now. ...
Thank you radoulov it is sorting correctly now.

And unfortunately we do not have -S option.
2,785
Posted By kesari
Try this..to list out all the files older than 15...
Try this..to list out all the files older than 15 days.
- find . -mtime +15 -exec ls -l {} \;
3,109
Posted By kesari
Sorting problem (SunOS 5.9 / KSH).
Hi,

Can someone tell me why the "LargeFile" is coming first before the smaller files. Is there any way to list the files based on size column.

ls -g| sort -k 4
-rw-r--r-- 1 user ...
6,063
Posted By kesari
Redirect the output (>) ...
Redirect the output (>) ...
6,063
Posted By kesari
For me below code is working (SunOS 5.9 .. KSH)...
For me below code is working (SunOS 5.9 .. KSH) ...
Better place your code ...

mychk.txt
========
new line added
testing purpose
check for 1 2
for 2 also 4
form 3 also 5 6
for testing only...
6,063
Posted By kesari
Hi, Use backticks ...`... not single quote...'...
Hi, Use backticks ...`... not single quote...'...
6,063
Posted By kesari
No single quote(') before '`grep and help.txt`'
No single quote(') before '`grep
and help.txt`'
3,585
Posted By kesari
Hi, mychk.txt check for 1 2 for 2 also...
Hi,

mychk.txt
check for 1 2
for 2 also 4
form 3 also 5 6

ksr/Scripts> cat mychk.txt | cut -d' ' -f1-3
check for 1
for 2 also
form 3 also
ksr/Scripts> cat mychk.txt
check for 1 2
for 2...
6,063
Posted By kesari
Hi Danish, Era already mentioned it use...
Hi Danish,

Era already mentioned it use "grep -n tre ..." instead of "grep tre ..."
6,063
Posted By kesari
Hi, Try this ... for i in `grep tre...
Hi,

Try this ...

for i in `grep tre My.log`
do
strow=`expr $i - 2`
myline=`echo "sed -n ""${strow}p"" My.log"`
done > MyNew.log
3,637
Posted By kesari
Issue while storing grep result
Thanks Era (for the link).

One thing is not clear to me is ...

grep returned multiple rows and the output is redirected to a variable then
-will it be saved in a single line (with hidden...
3,637
Posted By kesari
Issue while storing grep result
What is the difference between echo $ruleerrors and echo "$ruleerrors"?

Thank you
Showing results 1 to 21 of 21

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