Search Results

Search: Posts Made By: sai21
116,535
Posted By sai21
hostname
hostname
4,163
Posted By sai21
To understand us more, please post sample input...
To understand us more, please post sample input and desired output
2,537
Posted By sai21
Hope this will work out for u grep -w "search...
Hope this will work out for u
grep -w "search String" file
1,980
Posted By sai21
Hope this will resolve your problem while...
Hope this will resolve your problem

while read line
do
lineNum=$(grep -n "$line" file2|awk -F: '{print $1}')
endLine=`expr $lineNum + 14`
sed -i ''$lineNum', '$endLine' d' file2
done<file1
3,073
Posted By sai21
Your question is not clear.. I think,this...
Your question is not clear..
I think,this approach might help you. You can write a script which will keep on check whether any file opened thru vi. This can be checked thru ps command. If it is...
14,563
Posted By sai21
Here is the solution tranOrder=$(sed...
Here is the solution

tranOrder=$(sed '/transaction/s/\(.*transaction=\)\(.*\)/\2/' fileName|awk -F\" '{print $2}')
docMode=$(sed '/document_mode/s/\(.*document_mode=\)\(.*\)/\2/' fileName|awk...
1,308
Posted By sai21
>filename It will clear the contents in a...
>filename
It will clear the contents in a file
1,958
Posted By sai21
sed 's/\(.*no is\) \(.* \)\(and .*...
sed 's/\(.*no is\) \(.* \)\(and .* is\)\(.*\)/\2\4/g' filename
1,410
Posted By sai21
Getting value from a variable
Hi,
I am stuck up with getting value from a newvariable that I constructed from other variable...

For ex.
DIR=mydir
BKUP_mydir=bkupdir

DSTDIR="${BKUP_$DIR}"

cp -r $DIR/* $DSTDIR/*
...
4,427
Posted By sai21
echo...
echo "/home/folder1/html/home/house/Home.html@@/main/" | awk -F / '{ printf ("%s/%s",$5,$6)}'
4,427
Posted By sai21
echo...
echo "/home/folder1/html/home/house/Home.html@@/main/" | sed 's/\(.*\/html\)\(.*\/\)\(.*\/\)\(.*@\/.*\/\)/\2\3/'
6,111
Posted By sai21
ls -R| grep /| awk -F'/' '{...
ls -R| grep /| awk -F'/' '{ printf("%s/%s/%s\n",$2,$3,$4)}'
6,111
Posted By sai21
If you are working on Linux, Use the following...
If you are working on Linux, Use the following command to list out all the sub directories in a Directory
ls -R|grep :| awk -F':' '{ print $1}'
7,619
Posted By sai21
You can do the following way... 1. Intially you...
You can do the following way...
1. Intially you can set the counter varaible to 0
2. Whenevr you find a open brace increment the counter and store line number in a variable
3. When you find Close...
9,914
Posted By sai21
Use the following command sed 's/\(.*\)/\1...
Use the following command
sed 's/\(.*\)/\1 0.100000E+03 0.999900E+04 0.254000E-03/g' file >file.tmp
8,601
Posted By sai21
try this one cat abc.txt | grep s_dbport | awk...
try this one
cat abc.txt | grep s_dbport | awk -F" " '{ print $4 }'
360,826
Posted By sai21
use the following command gzcat filename.gz |...
use the following command
gzcat filename.gz | more
87,515
Posted By sai21
Many many thanks . now i am getting what i want
Many many thanks . now i am getting what i want
87,515
Posted By sai21
Need to check all virtual hostnames/virtual IP's
Hi Folks,

I want to check all the virtual hostname's/IP's of a host/ip. Currently we are using HP-UX and open SuSe. Please tell me the command to list out all virtual names of a particular host. ...
4,531
Posted By sai21
you do one thing ..put a condition in your job...
you do one thing ..put a condition in your job that the files which are refering is actually created by you or not by checking the file owner. You can avoid the other users files by checkign the...
5,205
Posted By sai21
$? means that the return code of the previous...
$? means that the return code of the previous command. When you write a script, we need to ensure that the command has successful or not. This will be done by checking the return code of the previous...
4,955
Posted By sai21
The simple way is rexec hostname command ...
The simple way is

rexec hostname command

it will prompt to enter the password. Once you enter the password of the remote machine, it will run the command on the remote machine..

I hope...
2,638
Posted By sai21
use diff command ......
use diff command ......
3
awk
1,764
Posted By sai21
Do u want the last ten lines of a selected file...
Do u want the last ten lines of a selected file or the last 10 field of a line ...
Plz clarify .....
4,819
Posted By sai21
Hope ...this will work out echo $TMPVAR |...
Hope ...this will work out

echo $TMPVAR | awk -F / '{ for (i=1;i<NF;i++) printf $i"/"; }'

Where TMPVAR contains the path of the file.
Showing results 1 to 25 of 26

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