Search Results

Search: Posts Made By: sank
983
Posted By sank
something like this: sed...
something like this:

sed 's/Released|Onchange.*/Onchange/' input.txt

This will not change the file content itself. If this is needed, you may do inplace edit with -i option to sed.
1,400
Posted By sank
If the format is fixed, then you may use the...
If the format is fixed, then you may use the following as well:
awk -F' ' '{print $5", "$6}' input.txt
7,287
Posted By sank
If the intention is to remove all the files...
If the intention is to remove all the files having the given pattern, it could be done as follows:

find . -type f -name \* -exec grep "eval(base64_decode" {} \; -exec rm {} \;

But if you want...
73,024
Posted By sank
sed -i 's/^/Root /g' a.txt -i option will do...
sed -i 's/^/Root /g' a.txt

-i option will do inplace modification.
2,407
Posted By sank
Have you tried using pdfinfo ? This gives...
Have you tried using pdfinfo ? This gives information about the title, date, creator etc, which you can extract and concatenate to form a new name for the pdf file.
3,559
Posted By sank
Looks like there is a problem in the for loop;...
Looks like there is a problem in the for loop; why don't you change the for loop to the following:

while read i
do
old=`echo $i | awk '{print $1}'`
new=`echo $i | awk '{print $2}'`

done <...
Forum: Programming 11-27-2008
4,548
Posted By sank
what exactly are you trying to do with the...
what exactly are you trying to do with the following ?
strcpy(str,file_name+1);

Change it to :
strcpy(str,file_name);
1,844
Posted By sank
that is right.
that is right.
1,844
Posted By sank
Please check the PID and PPID of the 2 processes...
Please check the PID and PPID of the 2 processes ( 2nd and 3rd column in ps -ef output ), you can make out which one is the parent.
Forum: Programming 08-25-2008
4,226
Posted By sank
It is used as a place holder in the initial phase...
It is used as a place holder in the initial phase of development.
I think you should look at the C++ annotations for the more detailed explanation as to why the above class should be valid.
3,458
Posted By sank
Hi, the above maynot work. Why not break the...
Hi, the above maynot work.
Why not break the query into multiple statements and try executing each one of them and see which part is giving the error ?
3,458
Posted By sank
If you are executing it from the script, try...
If you are executing it from the script, try double quotes like this:
I="grep 'I.P. Address' /install/cfgdist/`uname -n`.cfg | cut -d : -f 2 | cut -d . -f 1-3 | sed s/" "//g"
13,434
Posted By sank
is this is what you are looking for ?: ls...
is this is what you are looking for ?:

ls -ltrR | grep ^./
5,119
Posted By sank
may be, you can try: cat File1.txt File2.txt |...
may be, you can try:
cat File1.txt File2.txt | tee file_path1/Cat_File.txt > file_path2/Cat_File.txt
6,772
Posted By sank
tried zcat ?
tried zcat ?
2,439
Posted By sank
Not sure if this helps, but did you try executing...
Not sure if this helps, but did you try executing task A using 'eval' command ?
12,318
Posted By sank
why not use awk, try this: cat $filename | awk...
why not use awk, try this:
cat $filename | awk '/PAGENUMBER/{count++; { sub("PAGENUMBER",count, $0)}; }; {print }'

A part of this command is taken from a similar post by lyoncc, thanks to lyoncc.
2,492
Posted By sank
why not try this, not a tested code though : ...
why not try this, not a tested code though :

value=`cat $filename | | grep -A1 "SQL>" | grep -v "SQL>"`
4,621
Posted By sank
ok. you can turn off variable expansion by having...
ok. you can turn off variable expansion by having the string in single quotes:
k='$a$b'
echo $k --> returns $a$b
please try to form the string as above.
4,621
Posted By sank
when you do 'echo $k', do you see the shell...
when you do 'echo $k', do you see the shell variables expanded ?
I feel that you need to escape $ by adding '\' everytime you append it to k.
4,621
Posted By sank
then, you need to see how to read it into k by...
then, you need to see how to read it into k by escaping the $. can you tell us how you are reading it from the file and assigning to k ?
4,621
Posted By sank
probably the variable k is not formed correctly....
probably the variable k is not formed correctly. Can you try echo $k and see if you get $DESTDIR/$PKG/$VERSION ? Are you forming the variable k like this : k="\$DESTDIR/\$PKG/\$VERSION" ? if so, the...
2,242
Posted By sank
not sure if I have understood this. why do you...
not sure if I have understood this. why do you want to use perl for finding the file ? can't you use 'find' with 'exec' option ? am I missing something ?

thanks.
84,348
Posted By sank
can you try this: awk -v value=$variable '{...
can you try this:

awk -v value=$variable '{ print $17 > "output_value.txt" }' input
1,435
Posted By sank
oh well, didn't realize that krish has already...
oh well, didn't realize that krish has already replied. thanks.
Showing results 1 to 25 of 28

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