Search Results

Search: Posts Made By: paragkalra
5,953
Posted By paragkalra
Thanks, it worked.
Thanks, it worked.
5,953
Posted By paragkalra
How to indent the file lines using vi?
Every now and then I have to indent the lines in my script to 4 space characters.

I generally do it line by line.

Is there an automated command in vi using which I can indent some set of...
8,194
Posted By paragkalra
Thnx it worked.
Thnx it worked.
8,194
Posted By paragkalra
Redirecting output to both console and to a file
Hi All,

Is there a way in Bash we can redirection some output to both console and the file at the same time.

~Parag
1,584
Posted By paragkalra
Greping array values in Bash like Perl
Hi,

Is there an easy way to simulate following Perl code in Bash.

if ( grep {$my_value eq $_} @ARGV ){
print "Do Something\n";
} else {
die "Invalid value";
}
86,077
Posted By paragkalra
Doing undo in Vi editor
I generally use 'u' to do undo in vi editor. The problem is that it only does one level of undo.

Is it possible to recursively undo all the changes in vi editor till we reach the original stage.
3,633
Posted By paragkalra
Vi Editor - How to paste the line concatenated with current line
I generally use yy to copy a line and then p to paste the line at end of current line.

But is there a way to paste the copied line in concatenation with the current line with out going to next...
Forum: Solaris 05-07-2010
9,384
Posted By paragkalra
It worked thanks :)
It worked thanks :)
78,804
Posted By paragkalra
It worked :) I was anticipating some...
It worked :)

I was anticipating some function. Not sure what this line is doing:
78,804
Posted By paragkalra
chomp like Perl operator in Bash
I am sure there should exist a chomp like Perl operator in Bash using which I can literally remove new line characters as show below:



Any clue?
Forum: Solaris 05-07-2010
9,384
Posted By paragkalra
How to scroll through the man page in Solaris
Hey All,

I generally login to the Solaris box using Putty. But when I read a man page, I am not being able to scroll line by line using traditional 'j' or 'k' keys.

Any idea about how can we...
6,028
Posted By paragkalra
Ok Thanks... There is one more issue. ...
Ok Thanks...

There is one more issue.

For some odd reason the master driver script is not returning to shell when I am executing the scripts in background. Not sure why :(

So currently...
6,028
Posted By paragkalra
Capturing the exit status of the script running in background
Hi All,

I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.

Is there a way I can capture the exit status of each individual...
1,965
Posted By paragkalra
How to send a string to function containing wild card?
Hey All,

I am trying to send a string as an input parameter to a function which contains a wild card character - *



However the function is taking it as:


PS: The directory -...
2,632
Posted By paragkalra
Patch command help
Hello All,

I have a patch file which contains following types of lines -

@@ -617,14 +617,8 @@

What does they signify ?
81,757
Posted By paragkalra
Thanks 'durden_tyler' your code worked...but just...
Thanks 'durden_tyler' your code worked...but just to mention that it didn't work on Windows...

Same was the case with my 'sed' command I had mentioned at the start. It was not giving the desired...
81,757
Posted By paragkalra
Replacing hex characters '\x0D' with '\x0D\x0A'
Hello All,

I have a requirement where I need to replaced the hex character - '\x0D' with 2 hex characters - 'x0D' & 'x0A'

I am trying to use SED -


But somehow its not working. Any...
25,171
Posted By paragkalra
Command to find largest file.
Hi All,

Is there a direct Linux command to find the largest file by checking recursively in all the directories.
84,620
Posted By paragkalra
Ok got it fixed.... # cat /tmp/test.ldif ...
Ok got it fixed....

# cat /tmp/test.ldif




As you can see there is space between 'dn:' and 'ou=' in all the lines

Initially I was placing '\*' after [[:space:]] as shown below:


...
84,620
Posted By paragkalra
Matching white space through Grep
Hello All,

I am trying to match white space in patterns through - Grep

I tried [[:space:]] & [[:blank:]] but none of them worked.

Then I tried Perl extension '\s' and it worked.

So just...
5,627
Posted By paragkalra
It will also remove the tab charactes if any...
It will also remove the tab charactes if any present in the data.

I think following hack will do the trick....



Changing FS as I am interested in the space characters after the columns...
5,627
Posted By paragkalra
Ok fixed the issue... I was actually...
Ok fixed the issue...

I was actually combining windows file format files which had windows specific line break characters. As a result of which columns were not visible on same row...

Hence had...
5,627
Posted By paragkalra
I think I missed out one information.... ...
I think I missed out one information....

Although all the files have 1 column but that 1 column may have multiple rows but number of rows in all the rows will remain same...
5,627
Posted By paragkalra
tr is throwing an error: And Paste is...
tr is throwing an error:


And Paste is using the new line characters of the original rows. So rows are not appearing on single line. I would just like to remove new line characters of all the...
4,091
Posted By paragkalra
Ok using a better example: My aim is to...
Ok using a better example:

My aim is to print the rows with 3 ous and 3rd ou should not contain a comma. Following is the sample file:

# cat ou_comma_eg.ldif


So I executed
# grep -i...
Showing results 1 to 25 of 29

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