Search Results

Search: Posts Made By: Parrakarry
4,427
Posted By Parrakarry
Haha, I like the way that's worded.
Haha, I like the way that's worded.
4,427
Posted By Parrakarry
Well, I am but a lowly intern who has been given...
Well, I am but a lowly intern who has been given access to a test server. The only editor installed by default seems to be vi, which I haven't figured out how to exit without exiting shell yet. (yeah...
4,427
Posted By Parrakarry
Yeah, I'm a total noob who can't handle the truth...
Yeah, I'm a total noob who can't handle the truth yet, so I write my scripts in notepad++ and then paste them into x-shell and hit ctrl-d. IT WORKS OK.
4,427
Posted By Parrakarry
Thanks everybody, that worked like a charm. So...
Thanks everybody, that worked like a charm. So while we're here, how should I be telling cat to end files if I'm just doing command line work besides ctrl-d?
4,427
Posted By Parrakarry
Yeah, I knew ctrl-d wasn't a cat thing. That's...
Yeah, I knew ctrl-d wasn't a cat thing. That's why I was pretty embarrassed by this post. But if you can't ask anonymous people on the internet, who can you ask? :P
4,427
Posted By Parrakarry
Cat termination in script
So, I'm writing a shell script to help automate a process I'm doing. Basically I want to take input from the user for 2 variables, then create a file that consists of:

Variable1,Variable2...
3,615
Posted By Parrakarry
Fortunately, the project I'm working on will be...
Fortunately, the project I'm working on will be simple enough that just checking for numbers should do the trick. However, * will also be used as a wildcard, and some numbers will be in the format...
3,615
Posted By Parrakarry
Ahhhhh. Regular expressions are still kinda...
Ahhhhh. Regular expressions are still kinda tricky for me, but such a powerful tool! I shoulda thought to turn there. Thanks for your quick help.
3,615
Posted By Parrakarry
awk -- telling the difference between strings and integers
This should be a really easy question.

My input file will have a few fields that are strings in the first line, which I will extract and save as variables. The rest of the fields on every line...
2,276
Posted By Parrakarry
First one certainly works, although I'm not...
First one certainly works, although I'm not really sure what the /r does there. I guess it's like /a but for the file? Anyway, my work day is done, so I will get back to it tomorrow. Thanks so much...
2,276
Posted By Parrakarry
Well the double quotes certainly helped me move...
Well the double quotes certainly helped me move forward to a new error message, so that's something right? :P
2,276
Posted By Parrakarry
So is there a way to get awk to backslash escape...
So is there a way to get awk to backslash escape the newline? Or am I just barking up the wrong tree?

sed.awk:

{
x=1
for ( i = 1; i <= NF; i++ )
{
if...
2,276
Posted By Parrakarry
Hmm. Can you explain a little more how I would...
Hmm. Can you explain a little more how I would protect it with double quotes? The three ways I tried gave me:

$ sed '/KWName/a\
> '`"awk -F, -f sed.awk sednumbers"`'' sedtest.txt
ksh: awk -F, -f...
2,276
Posted By Parrakarry
sed command question
Hey all,

so I've been experimenting with SED today, no experience before today, so if you're not patient, stop reading now! :P

I will attempt to explain this as simply as possible, without...
4,452
Posted By Parrakarry
tl;dr: I should wait until I hear more from my...
tl;dr: I should wait until I hear more from my boss before asking confusing questions.

I have a list of hundreds of different document types, and the various keywords associated with them in our...
4,452
Posted By Parrakarry
I'm not sure I see how that would result in the...
I'm not sure I see how that would result in the output I desire. I suppose I could pipe all the fields within the awk statements into two seperate arrays, and then generate the xml after I've done...
4,452
Posted By Parrakarry
Nested awk Statements
Hello again everyone,

yes, I'm back again for more help! So I'm attempting to read two separate files and generate some XML code from that. My current code is:

BEGIN {
print "<?xml...
1,241
Posted By Parrakarry
Dear god. I am not a clever man. This is why I...
Dear god. I am not a clever man. This is why I ask you guys instead of my coworkers :P
1,241
Posted By Parrakarry
The output I want is: <?xml version="1.0"...
The output I want is:


<?xml version="1.0" encoding="utf-8">
<Export>
<section name="Query1">
<entry name="DocumentType">Document Type</entry>
<entry name="KWName1">Project Number</entry>...
1,241
Posted By Parrakarry
BEGIN { print "<?xml version=\"1.0\"...
BEGIN {
print "<?xml version=\"1.0\" encoding=\"utf-8\">"
print "<Export>"
}
{
print "<section name=\"Query" NR "\">"
print "<entry name=\"DocumentType\">" $1 "</entry>"
for ( i = 2; i <=...
1,241
Posted By Parrakarry
Simple awk help
Hey all,

so I'm using AWK in a project at work, to generate xml from csv. So far things are going relatively smoothly, but I have one thing I can't figure out.

For every field in each row, I...
2,196
Posted By Parrakarry
Ah, yes. I am using xshell, so I can scroll up...
Ah, yes. I am using xshell, so I can scroll up and down. Good point though.
2,196
Posted By Parrakarry
Yoda, that is a beautiful piece of code compared...
Yoda, that is a beautiful piece of code compared to mine, wow. Plus, I actually understand it! Thank you so much.

And Corona, not sure I understand the question? I could see the "blank" lines...
2,196
Posted By Parrakarry
IA Supporting Docs,Voucher Number,Invoice...
IA Supporting Docs,Voucher Number,Invoice Number,PO Number,Project Number,ORG ID,,,,,,,,,,,,,,,,
Invoice,Voucher Number,Invoice Number,PO Number,Project Number,ORG ID,,,,,,,,,,,,,,,,

I don't have...
2,196
Posted By Parrakarry
I changed it, but still getting the same results....
I changed it, but still getting the same results. It seems to be the inside loop that is not running again. Probably something I don't understand about the way the while loop is functioning... that's...
Showing results 1 to 25 of 29

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