Search Results

Search: Posts Made By: sarbjit
4,315
Posted By sarbjit
On Linux 4, the output of the Locale is : ...
On Linux 4, the output of the Locale is :

LC_COLLATE="C"

On Linux5, the output is :

LC_COLLATE="en_US.UTF-8"


So is this behavior due to change in Locale value between Linux 4 and 5....
4,315
Posted By sarbjit
Sort command results are different in Redhat 4 vs Redhat 5
Hi,

I am having a text file with the following contents

###########
File1
###########
some
page1.txt
text
page.txt

When I sort this file on Red Hat 5, then I get the following...
1,429
Posted By sarbjit
Issue using taskset on Linux
I am using taskset command to set the affinity for a process on RedHat5 machine. However I am observing some strange behavior with the taskset command.

/proc/cpuinfo for my machine shows that I...
1,603
Posted By sarbjit
How to make "tab" key in mksnt tool kit case sensitive?
I am using MKS Toolkit on windows7, i observed that when i use "tab" key to complete a file/dir name converts into lower case.

Eg:

I am having a directory named "Dir1", note "D" is in caps....
12,642
Posted By sarbjit
Could this O/P be converted to human readable...
Could this O/P be converted to human readable format, i mean list it in MB's or KB's?
12,642
Posted By sarbjit
Display Directories with their sizes in human readable format
Hi,

I want to list all the directories present in a particular location and want to display their sizes as well. I know "ls -lh" but it doesn't show the size of the complete directory. So i want...
4,512
Posted By sarbjit
You can do some thing like below using sed ...
You can do some thing like below using sed


cat file | sed 's#\(\.*IncludeDateTime\).*#\1#'
1,519
Posted By sarbjit
PERL: Help required exact match
Hello,

My requirement is to iterate over all the lines of a file and compare them with a word and perform some operations if exact match is found.

For the snippet below, it works even if...
4,375
Posted By sarbjit
Yes that will return both the lines, i want only...
Yes that will return both the lines, i want only that pattern which is having only three white spaces in front of it.
4,375
Posted By sarbjit
Grepping word based on white space.....
Hi,

I am having a text file with following contents:

[space][space][space]word
[space][space][space][space][space]word

I want to grep the first line i.e. word that is being preceded with...
3,426
Posted By sarbjit
Is it possible to password protect directories in linux?
Hi,

I am using Red Hat OS 5.0, is there any way that i can password protect directories. I know i can change permission so that no other user can access the content, but sometimes in my office...
Forum: Red Hat 09-01-2011
11,889
Posted By sarbjit
I am not sure what you mean by full screen mode....
I am not sure what you mean by full screen mode. But yes when i create vnc session, i specify geometry. So i use following command for creating vnc

vncserver -geometry 1300x800 <machinename>:1
...
Forum: Red Hat 09-01-2011
11,889
Posted By sarbjit
Automatic enable for screen lock in vnc
Hello,

I am using Redhat 5.0 OS, i want that the screen or session to be locked if machine is idle for few minutes. I have enabled screensaver lock on my machine and it works for my machine. But i...
21,015
Posted By sarbjit
I want "somedir" as output from this file path...
I want "somedir" as output from this file path keeping in mind that this file path is variable but somedir will always comes after "prac" directory.
21,015
Posted By sarbjit
sed/awk for extracting directory from file path
Hi,

I have following path:

set file_path = D:/forums/prac/somedir/new1/file1.txt

or set file_path = E:/new/forums1/prac/somedir/new2/file2.txt

I need to grep "somedir" from file path. In...
1,713
Posted By sarbjit
Thanks for reply, but i am really interested in...
Thanks for reply, but i am really interested in knowing significance of "__FD_PRN_". Is this a ascii or some other representation of "(" ? Could you please let me know what exactly these codes are...
1,713
Posted By sarbjit
What does "__FD_PRN_" means in perl code ?
I have seen something like this in a perl code:


$_ =~ s/__FD_PRN_/\\(/g
What does this "__FD_PRN_" means. I have searched google but was not able to find any info regarding this. Appreciate if...
2,457
Posted By sarbjit
Perl to remove words between patterns
Hi,

I am using following code to remove words between start and end points.


$mystring = "The start text always precedes the end of the end text.";
if($mystring =~ s/start(.*)end/\0/) {
...
1,410
Posted By sarbjit
Required help in perl regular expression substitution for this date format
Hi,

I have written a small perl script to handle particular date format using perl, but it is not substituting the whole string. Can some one please check on what is the issue with the code.

...
1,832
Posted By sarbjit
Help with perl eval command .....
Hi All,

I read the above written code (perl code) in another perl script and evaluates this code for each line of text file,but using exit statement in code make this not to work and i could not...
3,220
Posted By sarbjit
I have implemented using id as key instead of...
I have implemented using id as key instead of name as two students can have same name but will always have unique names. To seed the students data, i use csv file with id,name,sub1marks, sub2marks,...
4,656
Posted By sarbjit
I did something like this to achieve this, you...
I did something like this to achieve this, you can refine this code further. Basic just here is if length of list is 1, then you need to check whether this has further some members or not.


set a...
3,123
Posted By sarbjit
For getting number of lines, once you have read...
For getting number of lines, once you have read the entire file using read if you split it with new line character and use llength it will be returning number of lines. In actual number of lines...
3,123
Posted By sarbjit
In Tcl you can achieve this as follows: ...
In Tcl you can achieve this as follows:


set fo [open filename.txt r]
set file_data [read $fo]
close $fo
puts "Number of words in file are: [llength $file_data]"
puts "Number of lines in file...
4,656
Posted By sarbjit
You need to execute the procedure again in order...
You need to execute the procedure again in order to calculate the index of newly created list.

For instance if my initial list list1 has elements as 'a b c' and i inserted an element at last i...
Showing results 1 to 25 of 87

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