Search Results

Search: Posts Made By: donisback
2,189
Posted By donisback
Thanks .. This works.
Thanks .. This works.
2,189
Posted By donisback
[Solved] Print the grepped string alongwith the filename
We have C shell and we are executing the below script:

#!/bin/csh -f

if ($#argv != 2) then
echo "Usage $0 DirecotryPath Inputfilename"
exit 1
endif

set dir=$1
set fname=$2
echo $dir...
1,728
Posted By donisback
Append command and strings to a text file
hi gurus,
I'm executing some commands and I want to append both the command and output to a text file. Example:

echo "strings -a wicmex.o|grep '$Header'" >> tmp.txt
strings -a wicmex.o|grep...
1,083
Posted By donisback
Thanks a lot. I have just made a minor...
Thanks a lot.

I have just made a minor change:

find . -name "*.sh"|xargs perl -i -pe '/def\@xyz.com/&&s/,abc\@xyz.com,?//g;s/abc\@xyz.com/def\@xyz.com/g'


If abc@xyz.com is in the end, we...
1,083
Posted By donisback
Replace text
Hi,
I have 50 shells in a particular directory. In each shell, we have a variable
MAIL_SUCCESS=abc@xyz.com,def@xyz.com,emi@xyz.com

The variable could be different. Now my requirement is I've to...
1,513
Posted By donisback
Thanks a lot. It works amazing
Thanks a lot. It works amazing
2,190
Posted By donisback
Could you post the answer?
Could you post the answer?
1,513
Posted By donisback
Get only the 1st and 8th line from every 10 lines
Hi,
I have 1000 line text file.
I need only the 1st and 8th line from every set of 10 lines, that is,
1,8,11,18,21,21,28,31,38,... lines etc into a text file.

Please let me know how I can...
8,852
Posted By donisback
You can also use dos2unix filename.
You can also use dos2unix filename.
1,775
Posted By donisback
Thanks, this works perfect.
Thanks, this works perfect.
1,775
Posted By donisback
Count the number of strings in a block
Hi,
I have the following text in a file:

ISA*00* *00* *ZZ*ENS_EDI *ZZ*GATE0215 *110106*2244*U*00401*006224402*1*P*>~...
4,504
Posted By donisback
My Distribution is SUSE Linux Enterprise Server...
My Distribution is SUSE Linux Enterprise Server 10. (SLES10). The supported version is 5.8.8 . I have now successfully installed on the machine. The problem was with the PATH variable. I had to...
4,504
Posted By donisback
Perl-Upgradation from 5.8 to 5.12
Hi,
I have UNIX system on which Perl is already installed. When I run the command perl -v
. It gives the output as
This is perl, v5.8.8 built for x86_64-linux-thread-multi

Copyright...
12,901
Posted By donisback
Unzip files without overwriting
Hi,
1)I have two zip files a.zip and b.zip.
a.zip contains the files a.txt,b.txt and c.txt
b.zip contains the files a.txt,b.txt,d.txt,e.txt

Though some of the filenames in a.zip and b.zip are...
11,953
Posted By donisback
The command doesn't work .. My output should...
The command doesn't work ..
My output should not trim the spaces in the fourth field. It's not necessary to use awk command. Please tell me if there is any other way to extract the fourth field. The...
11,953
Posted By donisback
Hi Franklin and ryandegreat, Thanks for the...
Hi Franklin and ryandegreat,
Thanks for the reply.Both your commands work fine as long as there is only one space in the fourth field.
If the fourth field has more than one space then, it is...
11,953
Posted By donisback
Please explain
Hi Franklin,
Could you please explain your command, if you don't mind?


Regards,
Don[COLOR="#738fbf"]
11,953
Posted By donisback
Thanks
I found one more alternative:
awk '{if ( $1== "'"$a"'") {print $3}}' filename

Enclose the shell variable with (double quotes, single quotes,double quotes)

Your script also works..

Thank you.
11,953
Posted By donisback
Thanks
Thanks that command helped. I have one more doubt. I am unable to use shell variables in awk. Could you help me again with that? I have a sample file like this:

PROJECT PATH
-----------------...
11,953
Posted By donisback
Use awk to have the fourth column with spaces
Hi Gurus,
We have a ftpserver from which we do a dir command and output it to a local file.
The content of the ftpfile is:

07-15-09 06:06AM 5466...
5,464
Posted By donisback
Hi jim, could you please explain the command. I...
Hi jim,
could you please explain the command. I am new to Unix. I googled it and I could not find much information about curly braces.

Thanks,
Don
4
2,314
Posted By donisback
Thanks. Perl one-liner worked.:)
Thanks. Perl one-liner worked.:)
4
2,314
Posted By donisback
Grep
Hi,
I have a file as:

IIN*00*00*ZZ*NDC *ZZ*11847*090520*0200*U*00401*000000001*0*P*>~GS*HP*NDC STD...
Showing results 1 to 23 of 23

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