Search Results

Search: Posts Made By: scriptr2be
1,139
Posted By scriptr2be
ksh field math
Hi,
I have a text like with many rows of data like:
7a,0,1182
7a,1,1040
7b,0,483
7b,1,242
7c,0,224
7c,1,877

I need to be able to take the value of the first field (i.e. 7a) and if there...
Forum: AIX 05-16-2011
2,465
Posted By scriptr2be
It happens no matter what the file is called. ...
It happens no matter what the file is called. Question: If you mount a filesystem over a directory, do the underlying directory permissions have any real effect? The reason is that if we umount...
Forum: AIX 05-16-2011
2,465
Posted By scriptr2be
nothing in errpt. I unmounted, ran fsck which...
nothing in errpt. I unmounted, ran fsck which came back clean. But strangely once I do that, the problem goes away for awhile but then eventually returns.

We are at 5300-12-03-1107.

Thanks...
Forum: AIX 05-10-2011
2,465
Posted By scriptr2be
Parent directory seems to disappear if child fails rename
If I have a file/folder that a user does not have permission to and I try to rename it, it removes the entire parent folder. At that point it is only visible in a ls. (Not a ls -l, file, more, cd)....
11,597
Posted By scriptr2be
Scottn, Can you add the if statement to my...
Scottn, Can you add the if statement to my existing statement? I am not sure that can be done.

My current statement:
/usr/xpg4/bin/awk -F"[,|]" 'NR==FNR{s["\"" $1 "\""]=$2;next}{printf...
11,597
Posted By scriptr2be
So if this code produces the data file above: ...
So if this code produces the data file above:
/usr/xpg4/bin/awk -F"[,|]" 'NR==FNR{s["\"" $1 "\""]=$2;next}{printf "%s\"%s\"\n", $0, s[$3]}' LOOKUP.TXT finallistnew.txt >test.txt


How do you...
11,597
Posted By scriptr2be
Sorry. I don't know what code tags are in Unix...
Sorry. I don't know what code tags are in Unix scripting but here is a sample data file:

"16","\\server\IP\SCAN\11119431.pdf","100-1115555-222...
11,597
Posted By scriptr2be
awk - if field is empty, move line to new file
I have a script with this statement:

/usr/xpg4/bin/awk -F"[,|]" 'NR==FNR{s["\"" $1 "\""]=$2;next}{printf "%s\"%s\"\n", $0, s[$3]}' LOOKUP.TXT finallistnew.txt >test.txt

I want to include...
1,709
Posted By scriptr2be
Thanks, Jim. That worked great. And yes, this...
Thanks, Jim. That worked great. And yes, this is Solaris.
1,709
Posted By scriptr2be
when I run this, I get no output - on the screen...
when I run this, I get no output - on the screen or in a file.
1,709
Posted By scriptr2be
awk for presence of characters in a field
I have a text file like:

"10","server","","11111",JLB,

I need a way to say if the 3rd field has data in it, move the contents of the entire line to a new file.

Any ideas?
Thanks,
3,687
Posted By scriptr2be
Ah ha. I am running solaris and if you use the...
Ah ha. I am running solaris and if you use the awk in /usr/xpg4/bin, you are correct it does work. The awk in /usr/bin does not work.

Thanks so much!
:):b::b::b::b::b:

---------- Post...
3,687
Posted By scriptr2be
When I try that, the output looks like it appends...
When I try that, the output looks like it appends File2 to File 1.

#more test.sh
#!/usr/bin/sh
awk -F"[,|]" 'NR==FNR{s["\"" $1 "\""]=$2;next}{printf "%s\"%s\"\n", $0, s[$3]}' File2 File1
...
3,687
Posted By scriptr2be
grep, awk, nawk combo
I have 2 files:

File1
"aa","server","001-9031234-001",

File2
001-9031234-001|12345

Both files have many lines of text. Each line needs to be evaluated. I need to look at the value of...
Showing results 1 to 14 of 14

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