Search Results

Search: Posts Made By: ABE2202
8,457
Posted By ABE2202
I just tried the command nawk...
I just tried the command

nawk '{f=(substr($0,s,l);if (f !=file){close(file);file=f}}{print $0 > file}' s=487 l=2 test_dss > myOutputFile

but I got an error message again


Syntax Error...
8,457
Posted By ABE2202
@vgersh99: thank you very much for your postings,...
@vgersh99: thank you very much for your postings, I really appreciate that! :)
I would like to try it right now, but I am not the office.

Can you tell me if and where there is a variable to...
8,457
Posted By ABE2202
thanks for that code, but it seems I am to inept...
thanks for that code, but it seems I am to inept for handling and understanding this :(

nawk '{f=(substr($0,s,l);if (f !=file){close(file);file=f}{print $0 > file}' s=487 l=2 myfile


could...
8,457
Posted By ABE2202
Sorry but it didn't work. The position I...
Sorry but it didn't work. The position I mentioned was just an example, acctually it is changing and not a separate word. In addition my file is a compressed file. :(

So how can I look up in a...
8,457
Posted By ABE2202
that was really a FAST respond, I'll try it right...
that was really a FAST respond, I'll try it right now! :)
8,457
Posted By ABE2202
Grep in a file for a particular pattern in a particular position witihn the file
Assume I have a file with a lot of data sets like

123 abc 01
456 def 02
789 ghi

and I only want to grep all that datasets from my file having the pattern '02' at the postion 9-10 to get only...
3,045
Posted By ABE2202
thank you very much, of course your code was very...
thank you very much, of course your code was very helpful :)
3,045
Posted By ABE2202
Bash shell: Cutting pasting only parts of the name of a directory into a variable
I have a script in a directory and want to search the directory before like follows:


i=0
for file in ../HN_*
do
echo $file
((i+=1))
echo $i
done


Currently I get following...
4,464
Posted By ABE2202
Thank you, it's so easy and it works :)
Thank you, it's so easy and it works :)
4,464
Posted By ABE2202
How to read a file into a variable?
Hello,

I have a ini-file containing comma-separated e-mail addresses, an bash-script sending a mail. Mail-addresses and the mail-script are separated, so I need not to change the important mail...
3,059
Posted By ABE2202
thank you, your code looks very interessting and...
thank you, your code looks very interessting and works :)
3,059
Posted By ABE2202
cat a field and add a char
I tried to readout the forth word of a file and add a ',' after each occurance and write the result in a file, but following code doesn't work


cat output.csv | cut -d ';' -f4 || ', '>> NR.txt
5,930
Posted By ABE2202
search in all subdirectories for a file containing a certain string
Hello,

how can I search a directory AND all its subdirectories for a file containing a certain string?
My directories contain too many sql-files and I want to know whcih one of them write into...
43,596
Posted By ABE2202
Bash:How to split one string variable in two variables?
Hello,

I have a paramter $param consisting just of two literals and want to split it into two parameters, so I can combine it to a new parameter <char1><string><char2>, but the following code...
44,757
Posted By ABE2202
thank you very much, that was very helpful :)
thank you very much, that was very helpful :)
44,757
Posted By ABE2202
Bash: Catching the returncode from a script and using within another script?
Hello,

I want to run a bash script in another bash script, depending on the returncode or exitcode. But I don't know how to handover the returncode to the second bash script!?

I tried this...
2,206
Posted By ABE2202
yes thats exact what I meant, but unfortunately...
yes thats exact what I meant, but unfortunately it does not work
2,206
Posted By ABE2202
Changing Dispatcher's name in Mail-function
Hi,

currently I am using following command to send a mail:


mail -s"Query result" $TO $CC < input_file


It works, but I want to change the dispatcher's name / sender's name.
I tried...
3,138
Posted By ABE2202
Hi, I am sorry to say, but it none of these...
Hi,

I am sorry to say, but it none of these commands work.
Maybe the reason is because I need it in bash-shell?!

For instance when I try following code


egrep '^*[ ]+Runjob=1' test.ini...
3,138
Posted By ABE2202
thanks but both expressions didn't work :(
thanks but both expressions didn't work :(
3,138
Posted By ABE2202
regular expression grepping lines with VARIOUS number of blanks
Hi,

I need a regular expression grepping all lines starting with '*' followed by a VARIOUS number of blanks and then followed by the string 'Runjob=1'.

I tried that code, but it doesn't...
1,773
Posted By ABE2202
Command filtering ONLY rows NOT beginning with '*'
I need a command which filters rows ONLY NOT beginning with '*'

So far I have following NOT sufficient command, because it does not include ALL possible literals except of '*'


grep...
6,546
Posted By ABE2202
thank you I solved it by inserting a dummy ...
thank you I solved it by inserting a dummy

echo "" >>OUTPUT_FILE


now it works :)
6,546
Posted By ABE2202
actually my Input file is much longer and has...
actually my Input file is much longer and has more than one ','
I just shortened my postings for better reading
6,546
Posted By ABE2202
I think the problem is that I use also the...
I think the problem is that I use also the "cut-command"


grep '{' INPUT_FILE | cut -d ',' -f1-2 >>OUTPUT_FILE


without "cut" it works, but I need to cut the files.

awk did not work or...
Showing results 1 to 25 of 43

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