Search Results

Search: Posts Made By: dvah
2
sed
1,083
Posted By dvah
sed
hi,

Please can help me how to apply sed for the below scenario.

I need to search for a string in a file and if it exists in a line i need to replace the 5th string in that line with another...
756
Posted By dvah
help with awk command
hi,

i've a file with few rows that ends with a comma(,). I need to fetch just those lines and merge them in to a single line and remove the last comma







Thanks
3,206
Posted By dvah
Thanks, but i've to run my script part of a job,...
Thanks, but i've to run my script part of a job, so it would be better if i've the time processing part of my script.
3,206
Posted By dvah
datetime difference in seconds
Hi,

I'm trying to find processing time of my script. Please can someone give me the commands to get the start/end time in "dd-mm-yyyy hh:mm:ss" and the differnce in seconds.



Thanks!
989
Posted By dvah
awk command
Hi



o/p - condition size < 16
693
Posted By dvah
o/p in one line
hi is there any command that get me the output in one line?

for ex - ls - this ll show the files line by line, but i need that to be displayed in a single line.

Thanks
983
Posted By dvah
awk command
hi,



o/p



the awk command i use is



Is it possible to do this in a single awk instead of two

Thanks
1,426
Posted By dvah
sort command
i/p file


o/p file
1,277
Posted By dvah
Thanks. This works perfect. But if you dont...
Thanks. This works perfect.

But if you dont mind, can you pls give a brief explanation of ths command. It'll be really helpful to improve my awk knowledge.

Thanks once again!
1,277
Posted By dvah
awk command
Hi,

I just need a awk command to get the below task.

infile-


o/p


Thanks.
1,262
Posted By dvah
input value to a command thru shell
Hi,

I'm trying to create files in ccm thru a shell as the number of files that i need to create is in hundreds





The problem here is the command prompts for the file type to be...
1,081
Posted By dvah
This works fine, but may i know what this...
This works fine, but may i know what this condition does.
1,081
Posted By dvah
help with awk command
Hi,

I need a awk command to identify a few pattern in a file and delete them.

Rule - Delete lines that has single/multi space within double quotes





Thanks.
1,290
Posted By dvah
2,256
Posted By dvah
sed command to delete line
HI,

Im using the below commmand to delete lines having "(" at the start of a line.

sed -e '/^(/d'

But i need a command to delete lines that has only "(" in it and no other strings.
...
17,836
Posted By dvah
I managed to do it with this command
I managed to do it with this command
17,836
Posted By dvah
Thanks, but this command replaces each space/tab...
Thanks, but this command replaces each space/tab with a delimiter which i dont expect. And i have removed the i option as it is not supported in my machine.
17,836
Posted By dvah
Sorry but my machine doesnt supports ruby command.
Sorry but my machine doesnt supports ruby command.
13,889
Posted By dvah
ls -l | awk '{print $9, $5}'
ls -l | awk '{print $9, $5}'
1,682
Posted By dvah
While read line do echo "DELETE FROM...
While read line
do
echo "DELETE FROM TRS_ONE_ATDE WHERE DATA_DT =", $line >> $SCRIPT_FILE
done < $DBLIST
17,836
Posted By dvah
Sorry but this command fails for multiple...
Sorry but this command fails for multiple spaces/tabs.
3,493
Posted By dvah
remove duplicates and sort
Hi,

I'm using the below command to sort and remove duplicates in a file. But, i need to make this applied to the same file instead of directing it to another.



Thanks
17,836
Posted By dvah
replace spaces/tabs with delimiter |
Hi,

I'm looking for a command that replaces spaces/tabs with pipe symbol and store the result to the same file instead of routing it to another file.

infile


outfile


Thanks.
818
Posted By dvah
sed \ with \\
Hi,

Can i have teh sed command to replace the character \ with \\

Thanks
1,427
Posted By dvah
Thanks. This works perfect. I just tried...
Thanks. This works perfect.

I just tried this with my own lengthy script, that works fine too.


while read line
do
if [ `echo $line | grep "create table " | wc -l` -gt 0 ]
then
...
Showing results 1 to 25 of 71

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