Search Results

Search: Posts Made By: Manish Jha
23,459
Posted By Manish Jha
sed 'linenumberd' filename > newfilename ...
sed 'linenumberd' filename > newfilename

e.g. to delete 5th line
sed '5d' filename > newfilename
13,458
Posted By Manish Jha
try this one .. root@gmt_prd:/cer_eupuk/log>...
try this one ..

root@gmt_prd:/cer_eupuk/log> find /cer_eupuk/log -mtime +2 -type f | grep "/cer_eupuk/log/[^/]*$" | grep -v '/rf/'

"/" was missing in second grep after log.

--Manish
4,360
Posted By Manish Jha
this could be one of the option.. { rm -f...
this could be one of the option..

{ rm -f infile && awk '{ for (i=0;i<3; i++) { print $0 } }' > infile; } < infile

--Manish Jha
13,458
Posted By Manish Jha
second step "grep" is used to exclude the...
second step "grep" is used to exclude the subdirectories if there are any. If you have nested directories, first step would give you results from all the directires, which is the not the case we...
13,458
Posted By Manish Jha
use this
find $(Directory_PATH} -mtime +2 -type f | grep "$(Directory_PATH}[^/]*$" | grep -v '/rf/'
e.g
find /common/home/xyz/ -mtime +2 -type f | grep "/common/home/xyz/[^/]*$" | grep -v '/rf/'
...
9,649
Posted By Manish Jha
try looking for "recover" command in /usr/bin. if...
try looking for "recover" command in /usr/bin. if it there on your system, it would help you in getting the file as well as it would answer your questions too.

--Manish
9,651
Posted By Manish Jha
how abt if you serach you pattern first and then...
how abt if you serach you pattern first and then use awk to print last line/last field?
Or
simply add your search algorithm in the statment section of awk instead of having it in BEGIN section....
9,651
Posted By Manish Jha
could you paste an example what exactly you are...
could you paste an example what exactly you are looking for?
4,689
Posted By Manish Jha
export path of the directory in your .profile ...
export path of the directory in your .profile

like export PATH=$PATH:You path which you want to execute
e.g. export PATH=$PATH:\var\home\etc

now you could execute any script which is there in...
2,870
Posted By Manish Jha
as far as my understanding goes ^ refers to same...
as far as my understanding goes ^ refers to same beginning of the line in sed also.. it doesnt refer to non matching...
2,870
Posted By Manish Jha
why dont u use "^" to check the beginning of the...
why dont u use "^" to check the beginning of the line
like
sed 's/^abc/tr/' file1
it will search lines starting with abc only

--Manish
19,556
Posted By Manish Jha
tell what error u got? did u check your sql...
tell what error u got? did u check your sql separatly if it is working correct??
I have so many scripts which does like this .. I dont know what you are doing wrong?..
...
19,556
Posted By Manish Jha
use this v_syse=`${ORACLE_HOME}/bin/sqlplus...
use this

v_syse=`${ORACLE_HOME}/bin/sqlplus -s user_id/password <<END
select 6 from dual ;
EXIT;
END`

--Manish Jha
2,936
Posted By Manish Jha
you could do this by having few intermediate...
you could do this by having few intermediate steps like create temporary files for each document sections and then sort the necessary temporary file as per your need and later combind them in the...
4,090
Posted By Manish Jha
use this: echo "This is my first echo" |...
use this:

echo "This is my first echo" | tee -a /myLogFile.txt
36,786
Posted By Manish Jha
refer to this thread ...
refer to this thread

https://www.unix.com/showthread.php?t=33328
6,587
Posted By Manish Jha
try with awk. Use the...
try with awk. Use the substr($0,Starting_Position,Length) function to cut specific byte from the file.

e.g.
111333xx444TTTLKOPxxxxxxxxx


awk '
{
filler1=substr($0,0,3)
fild1=substr($0,4,2)...
9,026
Posted By Manish Jha
It works !! -- Manish
It works !!

-- Manish
9,026
Posted By Manish Jha
how to retain leading zeros
Hi All,

I am working with a fixed width file Forrmat.
C1 Number (10,3)
C2 Number (10,3)

e.g.
c1= 0000000100.000
c2= 0000000020.000
0000000100.0000000000020.000

I have to perform c1 -...
8,046
Posted By Manish Jha
use this
echo `wc -l filename| cut -f 1 -d " "`/2 | bc
2,030
Posted By Manish Jha
put some example !!!
put some example !!!
2,659
Posted By Manish Jha
use double quote ""
echo $string | sed "s/$sub1/$sub2/g"

single quote doesn't allow varible sto be parsed.

--Manish
34,567
Posted By Manish Jha
try this
echo "$LINE" | awk -v FSEP=$FSEP 'FS=FSEP { print $3 }'

--Manish
3,816
Posted By Manish Jha
use this
string="nh hjh llk"
echo $string | sed 's/ //g'

--Manish
15,577
Posted By Manish Jha
$Email_Body is a variable which contains the body...
$Email_Body is a variable which contains the body of the email. You could write email after Subject:,or you could have a file which you have to cat(like i did for 'To and Cc' list) or you could print...
Showing results 1 to 25 of 64

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