I have been at it for 3 days straight and it just does not work. I have googled and read several detailed threads, and followed along. Still I cannot get the ping to go through. I will just have to break down and buy the hub or switch. What do those things cost anyway (in US$)?
smah,
1. yes
2. yes - desktop is 192.168.0.227, laptop is 192.168.0.228
3. firewall disabled on both machines
4. selected "turn on file sharing ...." with network setup wizard on both machines.
I did everthing someone suggested on the second website. Nothing worked. I am at the same spot I was yesterday, where the laptop can ping itself but the desktop cannot. I am thinking the problem lies witth the desktop, but I am just not sure.
They both have the ethernet network card. I have the cable that runs between them. When I connect them, the netwok icons indicate that connections have been established. However, I cannot access any files. What am I missing?
Thank you all for your input.
Krunek, I did try your solution but got:
awk: syntax error near line 1
awk: bailing out near line 1
I probably would have to tweek something.
PHV's solution worked for me. Thanks. Someone pointed me to unix line command "unique -c" that gave me similar results...
I want to read in an input file of numbers.
I want the output to give me each unique number found and the count for each number found.
Currently, my script prints all the numbers with the count ascending.
sample output:
1 - 1
1 - 2
1 - 3
2 - 1
2 - 2
2 - 3
2 - 4
3 - 1
3 - 2
What I want is:
1 -...
if field is numerics (all 5 digits)
write field to file1
write field to file2.
if field is alpha-numeric (some alpha, some numeric, or all apha, not spaces)
write field to file1
write "1111" to file2.
if field has leading/trailing spaces (remaining vales are numerics)...
Thanks. That works if I want to print the field without leading and trailing spaces.
How about if I want to do some work with the non-space value digit/characters of this field?
Thank you.
Tell me, though, why is it necessary to have two [0-9]'s?
I tried the script as: "if ($2 ~ /^[0-9]*$/) {doNumeric }" and it seems to give the results I want.
The record is pipe-delimited.
I want to check if a field is numeric or alpha-numeric.
something like: if ($2 is numeric) { do something; }
Any suggestions?
I want to use awk to insert system date in a pipe-delimited file, so the output looks like:
firstname|lastname|20021203|address
The other fields of records in the file is created by the same awk script.
Thanks for any ideas?
Thanks.
The final script took the following form, and it works:
cat infile1 | nawk -F ',' '{gsub(" *, *",",");print $0}' > filename
I tried the function as a stand-alone.
The results were that 1 trailing space was left before the comma.
eg: first name,last name ,address1 ,address2,
produced:
first name,last name ,address1 ,address2,
instead of:
first name,last name,address1,address2,
I was hoping for something simplier.
But while I wait, can I include that function within
an awk script that will be used to eventaully process the file?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.