Search Results

Search: Posts Made By: sh_kk
23,572
Posted By sh_kk
Using grep to find multiple whitespaces
Hi All,

Have a query on finding the lines with at least one whitespace. Have following lines in my file myfile.txt


I
I LOVE
I LOVE FREEDOM
I LOVE FREEDOM
I LOVE FREEDOM AND PEACE


I...
1,910
Posted By sh_kk
But this is a PERL scripting forum as well !! :)...
But this is a PERL scripting forum as well !! :) ... I want to achieve the same in perl scripting.

Apologize for the same.
1,910
Posted By sh_kk
Scroll records from database, one at a time
Hi,

I need to come up with a site that will display all the records in the database, but one at a time[by clicking NEXT button on the webpage].

Not sure how to go about it.

Please pour...
4,731
Posted By sh_kk
String Concatenation
Hi All,

I need to concatenate the values in the array into a variable. Currently the code is :


for (( i=1 ; i <= $minCount ; i++ ))
do
var="${var}""${sample_file[$i]}"
done


The...
18,513
Posted By sh_kk
^^ Thank you for replying. Here is...
^^

Thank you for replying.

Here is what I am trying to do.

I have made a set of files and want to archive all of them.

1 > I pass all the files to PAX command and store the o/p in a...
18,513
Posted By sh_kk
Hi All, Am getting following error while...
Hi All,

Am getting following error while executing gzip:

/$HOME/A >> gzip > /$HOME/B


Getting error :
./shell: line 38: //home/XYZ/A: Permission denied

Permission are:

-rw------- 1...
18,513
Posted By sh_kk
Using GZIP command
Hi All,

Is it possible to redirect the o/p of gzip command to another file?

I need to store the o/p in a separate file


Regards,
sh_kk
3,680
Posted By sh_kk
Sir, I am trying to retrieve the value of n...
Sir,

I am trying to retrieve the value of n for later use in my script. But I am not able to. IN the END block, I have done the following

END { minCount = n }

But it does not work and...
3,680
Posted By sh_kk
Can you please explain me the code ??
Can you please explain me the code ??
3,680
Posted By sh_kk
Thank you sir !! The value comes out to be...
Thank you sir !!

The value comes out to be zero, so my logic is wrong. Do I have to specify the Field separator as well ???
3,680
Posted By sh_kk
Thanks a ton !!! U compressed it incredibly :)...
Thanks a ton !!! U compressed it incredibly :) ... But can you please evaluate my code?? And why am I getting simple variable declaration errors?
3,680
Posted By sh_kk
Count minimum columns in file
Hi All,

Consider the file with following lines:

1,2,3,4
1,2,3,
5,6,7,7,8,9
1

[Please note that the actual contents of file have no reln with the query]

I need to get the count of...
1,451
Posted By sh_kk
Hi, Thanks for your help. I have...
Hi,

Thanks for your help.

I have another query:

The code should be checking if a file exists or not.

When I run the command for a existing file, the message is printed. But the same...
1,451
Posted By sh_kk
Query on File checking
Hi All,

I am a newbie to Shell programming and stuck with the folllowing issue:

Here is the code:

#! /bin/sh

if [ls "$1"];
then
echo "Checking if the file is found or not"
fi

On...
3,425
Posted By sh_kk
Sir, it was only changing the 1st occurrence of...
Sir, it was only changing the 1st occurrence of the rank field.

i.e. was getting |1|9.1| ... but then the next values continued to be the same
i.e. |2.|9.1| ....

I made the following change...
3,425
Posted By sh_kk
^^ Sir, here is my pipelined SED so far to...
^^

Sir, here is my pipelined SED so far to convert the HTML page to the o/p mentioned in Post 1.

sed '/Top 250 movies/!d' top250.html | sed 's/^.*<\/b><\/font><\/td><\/tr>//' | sed...
3,425
Posted By sh_kk
^^ Sir, Cannot create temp files for...
^^
Sir,

Cannot create temp files for storing the o/p.

And the command is affecting the second column as well. Please have a look at the o/p


|1|9.|The Shawshank Redemptio|(1994|447,83|...
3,425
Posted By sh_kk
Not working sir !!! Not sure what -i does....
Not working sir !!!

Not sure what -i does. But its anyways replacing the values in 2nd column as well. As mentioned, it needs to affect the 1st column only to remove the trailing dots after ranlk...
3,425
Posted By sh_kk
Help using SED command
Hi All,

I have converted a HTML page<http://www.imdb.com/chart/top> which consisted of the movie names using a pipelined SED commands to retrieve only the table as shown in the page.

Here is...
2,943
Posted By sh_kk
Its even supposed to sort !!! And you are...
Its even supposed to sort !!!

And you are not considering the white spaces.

Please reply ... I urgently need a solution on this.
2,943
Posted By sh_kk
Problem with White spaces and tabs
Hi All,

I am facing issues converting white spaces and tabs together in a file I am reading. Here is the command I am trying:

tr -s ' '@ | sort -t@ +1n filename

I guess the problem is that...
Showing results 1 to 21 of 21

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