Search Results

Search: Posts Made By: SummitElse
2,238
Posted By SummitElse
find and replace
I am looking to find and replace a string in a file, can anyone suggest a global find and replace. looked at previous replies on other queries but none seem to address what i am looking for. aint...
16,861
Posted By SummitElse
Cheers V310
That worked a treat mate you truly are a scripting guru, thanks again mate. think I'll need to study up on SED
16,861
Posted By SummitElse
Query
Just a quick query does that work on the datestamp of the file and not the actual date format in the file name, I have created the copies of these files from one server to the other so the datestamp...
16,861
Posted By SummitElse
got some code but stuck for the comparison part
ls | {

while read x;
do
y = $(echo $x | cut -c3-8)

need to compare the output with the computer date

and if older than seven days move it as below

if [! -f $y];
then
echo...
16,861
Posted By SummitElse
Want to mv files form one folder to another by date
Hi All

Looking for some help here I want to query a file and mv all files that are older than seven days to an archive folder.

the archive folder already exists but I am having trouble with the...
Forum: Programming 11-13-2007
6,726
Posted By SummitElse
try C++
#include<stdio.h>
#include<math.h>
main ()
{
const float PI=3.142857;
double r, A;
A = (PI/4)*(r*r);

cout<<"Enter the value of radius: ";
cin>>r;

cout<<"Area of circle is "<< A;
}
Forum: Programming 11-13-2007
6,726
Posted By SummitElse
just a thought include<stdio.h> ...
just a thought

include<stdio.h>
include<math.h>
define PI 3.142857
main ()
{
float r, A;
printf("Enter the value of radius: ");
scanf(" %f ",&r);
A = (PI/4)*(r*r);
printf("Area of circle...
1,706
Posted By SummitElse
cat trial.txt | egrep ',100,|,200,' | wc -l| more...
cat trial.txt | egrep ',100,|,200,' | wc -l| more
3
try an alias

alias command="egrep ',100,|,200,' | wc -l"

cat trial.txt |command |more
3
1,706
Posted By SummitElse
what file are you searching with egrep?
what file are you searching with egrep?
1,782
Posted By SummitElse
hi porter yeah I understand that but we are...
hi porter yeah I understand that but we are trying to avoid using relative paths
1,782
Posted By SummitElse
calling a script from a level above where the script resides
is there anyway to call a script that executes a script on the same level from a higher level

i.e.

level1/level2/ kp1script kp2script

kp1script (./kp2)
kp2script (echo "Hi world")
...
2,767
Posted By SummitElse
Cheers grial almost there only problem keeps...
Cheers grial almost there only problem keeps reverting to $val to 0

I need to keep a record of the last value and use this the next time the process is ran
2,767
Posted By SummitElse
comparing files to contents of a file
Hi I have a problem trying to run a while statement.

I have files under one directory that i need to compare to a value in filex and update that file with the result

files in the directory are ...
1,773
Posted By SummitElse
Cheers *nixers, problem almost solved
Cheers *nixers, problem almost solved
9,580
Posted By SummitElse
alternate lines from two files
A basic request two files want to combine them but on alternate lines
1,773
Posted By SummitElse
make the first your last
Hi I am using grep to interrogate the last command and I want to find users for both tue and wed,

The problem: for some reason the grep command will not allow me to do an or

i.e. last | grep...
5,156
Posted By SummitElse
Champion Mate works a treat can use this as part...
Champion Mate works a treat can use this as part of a larger script I'm working on
5,156
Posted By SummitElse
sorry bhargav I am trying to interrogate the file...
sorry bhargav I am trying to interrogate the file sequentially and finger each of the individual users

<tam> file

hb1
hb2
hb3
dr33
tr55
etc

I want to create a new file that would show...
5,156
Posted By SummitElse
finger a list from a file
I am trying to find a way of fingering the first field in a listfile created from the who command, and write the results to a new file

eg

"`who | cut -f1 -d' '` | more > tam"
gives me the list...
Showing results 1 to 19 of 19

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