Search Results

Search: Posts Made By: jgrosecl
1,560
Posted By jgrosecl
No spaces. What if I needed to search exactly for...
No spaces. What if I needed to search exactly for a variable?

for example, x=1000, and I needed a grep statement to only return lines in a file containing exactly x
1,560
Posted By jgrosecl
Easy Grep Question
This seems like an easy question, but I can't find an answer already posted.

I want a command to return all of the lines in a file containing exactly a string

I tried
grep -x "372701" x.txt ...
1,742
Posted By jgrosecl
Replacing grep with awk
This may be a repetitive or simple question, but I have a long running code, which uses a grep with a big argument, and i was wondering if there was a way to replace all of my greps with awk....here...
1,154
Posted By jgrosecl
Find all chars before .
Howdy,

I need a command which will find all of the characters in a line before the first .

I am using Korn

Thank you
14,188
Posted By jgrosecl
no luck with the grep expression with single or...
no luck with the grep expression with single or double quotes

here is the entire expression im working with:


u=$(ls /XXXX/XXXX/XXXX/I3 | grep -E "\.02.{6}\.02")
echo $u
for i in $u
do...
14,188
Posted By jgrosecl
Should have been more clear about the terms of...
Should have been more clear about the terms of search.

Hi everybody,

Fairly simple question here:

I need an awk, sed, or grep command that will find the same string multiple times on one...
14,188
Posted By jgrosecl
does that work with directories as well? I tried...
does that work with directories as well? I tried using this:
u=$(ls /XXXX/XXXX/XXXX/I3 | grep -E '\.02.{6}\.02')

to find all the lines which contained .02 .02 in that directory, to no avail.
14,188
Posted By jgrosecl
Find string multiple times, same line
Hi everybody,

Fairly simple question here:

I need an awk, sed, or grep command that will find the same string multiple times on one line

needs to return all lines which contain .02 twice.
...
2,521
Posted By jgrosecl
I'm sorry, maybe I used the wrong syntax on those...
I'm sorry, maybe I used the wrong syntax on those commands, however, neither of them returned just the filenames.
I'm looking to give the script a directory, and search all the filenames in the...
2,521
Posted By jgrosecl
Search filenames in directory, return filename only
Howdy,

I am trying to search for a string within a directory, and then return the filename only, without the directory itself.

I am using korn shell and the command

x=$(find...
1,295
Posted By jgrosecl
Thank you, the while loop is working quite well...
Thank you, the while loop is working quite well for me, perhaps you could also help me with the problem I am having now, if its not too much trouble:

while read a b c
do
for line in $c
do...
1,295
Posted By jgrosecl
Print individual rows.
Hi all,
I have a file im reading with a for loop using:

for i in $(cat filename)
do
etc.
done

the original file is 3 columns, this method prints it out into 3 rows, and i would like to...
1,439
Posted By jgrosecl
So the proper syntax would then be: ...
So the proper syntax would then be:

's/\.\00/\.\/'


?
1,439
Posted By jgrosecl
Replace exactly a string for another using sed
Hi everyone!
I'm trying to replace a string with another string using sed. Problem is, using

sed 's/.00/./'

it even replaces 00. with .

I need to only replace exactly .00 with .

My...
5,160
Posted By jgrosecl
It seems as though that now works, perhaps a...
It seems as though that now works, perhaps a syntax error on my part at some point. I would like to use that argument to make some changes to filenames, however it appears as though I have some other...
5,160
Posted By jgrosecl
If statement for substring within string (korn)
Hi all,

Just looking for a simple if statement that searches for a substring within a varaible, and then performs some function.

Problem is that I need it to work in Korn shell

$var =...
1,187
Posted By jgrosecl
Excellent! that is perfect. And one last thing!...
Excellent! that is perfect.
And one last thing! I am trying to replace one variable (string) with antoher variable using:
sed "s/$x/$y/g"

however, it seems as though this is incorrect, as it...
1,187
Posted By jgrosecl
Actually now it is just the command to remove...
Actually now it is just the command to remove leading zeroes from all filenames in a directory.

They look like this:
XXX03XXX.00XXXXXXX.XXXXXXXX

And I want to remove just the leading zeroes...
1,187
Posted By jgrosecl
Read and Replace
Hi!
I think my last post was a little confusing, so I will try an post a sample this time.
I have a script which is supposed to output two columns of a file to a different file, then take the first...
1,294
Posted By jgrosecl
update
I tried to work that in, but I suppose my issue was a little different than I explained it, or can be solved more logically than I tried to solve it.

I have a file with 3 columns like so....
...
1,294
Posted By jgrosecl
Column Script
Hello,

Im having some difficulty writing a krn shell script

The script must accept a text file with 3 columns
Take each column to be a different variable
then, take each line in the first...
Showing results 1 to 21 of 21

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