Search Results

Search: Posts Made By: demmel
891
Posted By demmel
Multiple FOR;Singe DO statement
Hi guys,

I'm trying to send variable commands from 2 different files but I'm not figuring out how to put 2 "i" variables into the command, can anyone help?

This is what is done when I read only...
6,600
Posted By demmel
Thanks a lot! The awk worked out just nice,...
Thanks a lot!

The awk worked out just nice, however I could not get the grep one to do the same... anyways, thank you very much!
6,600
Posted By demmel
Grep -v lines starting with pattern 1 and not matching pattern 2
Hi all!

Thanks for taking the time to view this!

I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.

Example:

Drink a soda...
2,096
Posted By demmel
Your suggestion using a here document worked best...
Your suggestion using a here document worked best for all purposes. I don't even have to worry about quotes and double quotes using this solution. The script is much more improved now.
:b:
Thank...
2,096
Posted By demmel
Its running with AIX OS. Shell is currently...
Its running with AIX OS.

Shell is currently as #! /usr/bin/ksh

The echo command is just literally as:

echo 'text
text
text
text' > /home/newfile
2,096
Posted By demmel
Replacing echo with print
Hi everyone,

I'm executing a shell script and one of the commands is creating a file with text via echo.

However, if the text within echo has "\t" or similar, it automatically translates it...
4,863
Posted By demmel
This one returned an error: sed -n...
This one returned an error:

sed -n '/===/{N;/===.*\n===/{n;p;};}' file
sed: There are too many '{'.

Other 2 options worked fine.

Thank you guys.
4,863
Posted By demmel
Replacing multiple line patterns with awk
Hi forum,

Can you please help me understand how to look for and replace the below pattern (containing line breaks) and return a new result?

Rules: Must match the 3 line pattern and return a 1...
1,772
Posted By demmel
Hi everyone! All options worked fine,...
Hi everyone!

All options worked fine, however I chose the solution provided by senhia83 as I think its more "flexible" in regards of what other commands besides echo can be prompted into the...
1,772
Posted By demmel
How to merge variable data from another file into specific place?
Hello,

I'm trying to create multiple commands using a variable input from another file but am not getting any successful results.

Basically, file1.txt contains multiple lines with single words:...
1,731
Posted By demmel
Thanks Brian from Pittsburgh AKA gandolf989. ...
Thanks Brian from Pittsburgh AKA gandolf989.

This is actually part of a solution for daily manual intervention that I face. It will surely help me a great deal. I'll make sure to put your nick...
1,731
Posted By demmel
Thanks!
Thanks!
1,731
Posted By demmel
Nested if statements with word/number extracts
Hi everyone!

I'm having difficulties setting up a complex script with nested if statements while doing some word extracts, any help is appreciated.

Scenario:

1- Check if the file.txt has the...
3,715
Posted By demmel
Great! It worked as I expected, thanks a lot!
Great! It worked as I expected, thanks a lot!
3,715
Posted By demmel
Moving line up if line starts with + sign.
Hello everyone,

I'm struggling with this command:

awk '!/^\+/{ORS=FS}/^\+/{ORS=RS}1' file1 > file2
What I want to do is to move any line that starts with the + sign 1 up, so its the...
1,239
Posted By demmel
This worked like a charm! Thanks a lot!
This worked like a charm! Thanks a lot!
1,239
Posted By demmel
[SOLVED]How to break the line to the one above?
Hello everyone!

I'm trying to make the below file1 look like file2, can anyone help?

Basically I just hit backspace on every line that starts with a number.

Thanks!

file1:

THIS#IS-IT1 ...
3,690
Posted By demmel
The standard word you defined is great as it is. ...
The standard word you defined is great as it is.

I created the temp script but it did not work as expected in one of my systems

$ ./temp.sh
sed: Function s/\<[a-zA-Z0-9_]\+\>/& cannot be...
3,690
Posted By demmel
I may be doing something wrong, but I'm unable to...
I may be doing something wrong, but I'm unable to get any results from this script.

I ran the same , only replacing the file input name.
Tried in 2 dif envs:

1-$ ./array
./array[3]: typeset:...
3,690
Posted By demmel
I actually prefer counting the words even if its...
I actually prefer counting the words even if its between other words, so RudiC seems the best option, anyways all the replies helped me a lot, so thanks to all!

---------- Post updated at 06:49 PM...
3,690
Posted By demmel
How to count number of results found?
Hi guys,

I'm struggling with this one, any help is appreciated.

I have File1 with hundreds of unique words, like this:
word1
word2
word3

I want to count each word from file1 in file2 and...
3,163
Posted By demmel
This has worked out greatly! Thanks a lot...
This has worked out greatly!

Thanks a lot Chirel!
3,163
Posted By demmel
look for line from FILE1 at FILE2
Hi guys!

I'm trying to write something to find each line of file1 into file2, if line is found return YES, if not found return NO. The result can be written to a new file.

Can you please help...
Showing results 1 to 23 of 23

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