Search Results

Search: Posts Made By: unknown7
12,303
Posted By unknown7
Thanks ++
Sometimes you just can wonder why you didn't find it :-)

I now remember that it was possible to add a pattern in front of sed substitution.
I don't want to substitute again, if i was obviously...
12,303
Posted By unknown7
Grep and sed (replace string in patterned lines)
Grep and Sed (replace string in patterned lines)

Hi all,
I want to grep for "PATTERN" and only if "PATTERN" is in a line, this line shall be used as replacement input e.g. for SED.

I don't get...
1,493
Posted By unknown7
Not exactly what you said but you gave me the...
Not exactly what you said but you gave me the point...
the issue is, I used an alias as my_command.
So workaround is easy: replacement of the alias with the command in it.

Now it works...
1,493
Posted By unknown7
Use command to get a parameter and add extension
Hi,

I'd like to get something like:

Input:
my_command FILEOutput to command line:
my_command FILE.ext1 FILE.ext2explained:
I want to provide a filename without extension and it should be...
3,503
Posted By unknown7
Can't work logically because you would get first...
Can't work logically because you would get first line from first and than you would print out with first_1_line all second lines and not just second_1_line

But thanks.

AWK worked. Just not...
3,503
Posted By unknown7
Thanks, I removed the spaces but I get no...
Thanks,
I removed the spaces but I get no response from the script.

rights correfct - folder okay - file1 and file2 is in the folder and contain valid information.
Call:
merge2.sh file1 file2...
3,503
Posted By unknown7
Thanks for help, but still a small issue. ...
Thanks for help, but still a small issue.

Please have look. It says files not found (files are there!)

Command to call:
merge4.sh file1 file2


#!/bin/sh
fileA = $1
fileB = $2
nawk...
3,503
Posted By unknown7
Yeah processing the output with cat was my...
Yeah processing the output with cat was my "workaround".
Thanks for the additional possibilitys!

====

how to use system in my case? I mean with array element inside.

system("command a[k]...
3,503
Posted By unknown7
How can i run "normal" commands in an awk script?...
How can i run "normal" commands in an awk script?

#!/bin/sh
nawk 'NR==FNR\
{
a[++i]=$0;next
}
{
b[++j]=$0;
}
END\
{
for(k=1;k<=j;k++)
{
print "\n======== " a[k] "...
3,503
Posted By unknown7
Can you please explain me if/why AWK on SunOS is...
Can you please explain me if/why AWK on SunOS is different to the AWK on linux.
Is it just outdated on SunOS? Would be nice to understand what the issue is.
Strange is, that AWK also worked but...
3,503
Posted By unknown7
Damn... I spent hours for this and it's based on...
Damn... I spent hours for this and it's based on OS? :-/

SUN OS 5.8

command line also does not help.

TCSH and BASH:
awk 'NR==FNR{a[++i]=$0;next}{ b[++j]=$0;}END{...
3,503
Posted By unknown7
^^ I still tried this... output is: any...
^^ I still tried this... output is:


any hints? :-/
3,503
Posted By unknown7
Thanks, can you show me how i can use now this...
Thanks,
can you show me how i can use now this in a script with usage of the vars? (nawk BEGIN usage?)

I want to use each element for my commands.

so for example like:

echo This is first...
1,838
Posted By unknown7
Hi, could you explain how this command works? ...
Hi,
could you explain how this command works?
Especially this part "&\1".
Thanks
http://fedora.unix.com/images/misc/progress.gif
3,503
Posted By unknown7
Thanks for the fast response. Nearly what I...
Thanks for the fast response.
Nearly what I wanted.

But this puts the complete file into the first var and prints always the complete first var and not just the related lines.


Used code:...
3,503
Posted By unknown7
Foreach issue
Hello,

I found that this foreach should work with two lists (source: Wikipedia.org)

foreach i {1 2 3} j {a b c} { puts "$i $j"}

==
I try smth. like:
With two text files:
first.part...
2,336
Posted By unknown7
@Shell life EDIT: Solution nearly works. Thanks...
@Shell life
EDIT: Solution nearly works. Thanks a lot. Just the first "\" is wrongly removed. If 19 char + "\" than do nothing. Means it was a longer char which was splitted prev. correctly. And do...
2,336
Posted By unknown7
Thanks a lot I will try. Maybe you...
Thanks a lot I will try.
Maybe you missunderstood me, I'm sorry if i explained to bad.
The ISSUE code was previousely done with this rule. It means whereever a "\" is, is NO newline. So its a line...
2,336
Posted By unknown7
AWK/SED: linebreak issue
Hi all,

I hope you guys can help me.
I prefer SED/AWK solutions if possible. For my shame it didn't work for me :o
ISSUE: :wall:
1\3

1/$4\@7\
1234567890123456789\
1234567890123456789,\...
3,505
Posted By unknown7
@suresh.boddepu works well thx / for noobs like...
@suresh.boddepu works well thx / for noobs like me ;-) i checked manpage:
ORS output record separator (default new-line)
@pravin27 does not remove the / at line ending - but thx for try......
3,505
Posted By unknown7
Hi pravin... does not work... what shall i use...
Hi pravin... does not work...
what shall i use as delimiter?

tried "" and "\n"

So your command gives following error:
paste: no delimiters

and mine works with \n but i can't see any...
3,505
Posted By unknown7
multy line remove newline and last slash in a line
Hi again,

how can i remove newlines and lst slash?

Examplecode:


i want to remove the last slash in a line and the newlines
3,505
Posted By unknown7
works well... using SUN OS did smth....
works well...
using SUN OS

did smth. wrong... thanks - exactly what i searched for... a one line sed command!
3,505
Posted By unknown7
sed -n '/folder_start/{N;s/\nversion: /@@/p;}'...
sed -n '/folder_start/{N;s/\nversion: /@@/p;}' ifile
did not work for me...
edit: note: No error but also no output (right dir and right file choosen)

could you please explain me the command...
4,876
Posted By unknown7
I had a look in the man pages... but did not get...
I had a look in the man pages... but did not get it completly...

could you please explain me exactly what ...
1.) !d does?
2.) xargs -n1 does?
Showing results 1 to 25 of 36

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