Search Results

Search: Posts Made By: Mark_orig
2,366
Posted By Mark_orig
When I run it , it prints this, not the comments:...
When I run it , it prints this, not the comments:

./code.txt HelloWorld.java

file HelloWorld.java exists
file HelloWorld.java is a .java file
2,366
Posted By Mark_orig
Thank you for the answer, but I want something...
Thank you for the answer, but I want something defferent (no Perl) , like this:

#!/bin/sh

if [ -f $1 ]; then
echo " file $1 exists"
else
echo "file $1 does not exists"
fi
exit 1

# but...
2,366
Posted By Mark_orig
print only comments
I want to write a shell script which it takes as argument a java file or a c++ file (.java or .cpp).
It will check if the file is type of java or c++, else it ends with error message.
If all are...
3,931
Posted By Mark_orig
awk-files in a txt
There is a file that contains access's data to a web server. Each line of the file (it's big) it's :

IP Client - - [date-hour] "Command Path Protocol" code size "client software"


Example,for...
1,593
Posted By Mark_orig
:D You are genius ! :D ---------- Post...
:D You are genius ! :D

---------- Post updated 06-12-10 at 01:05 PM ---------- Previous update was 06-11-10 at 04:38 PM ----------

And how to find the total cost per year ? 2007, 2008, 2009 etc...
1,593
Posted By Mark_orig
awk-calculate records of a text
I want to make a bash shell script that accepts as argument a file name (cars.txt) and: 1) calculates the total price per year and per model.
2) For each car that it's number starts with TK, I want...
2,274
Posted By Mark_orig
It works now ! I recreate the data.txt file and...
It works now ! I recreate the data.txt file and now it's ok.
Thanks a lot guys ! :b:
2,274
Posted By Mark_orig
with this command the output is: awk...
with this command the output is:


awk 'NR==1{a=$0":";next} $0 !~ /:/ {print a;a=$0":";next} {for(i=2;i<=NF;i++)a=a" "$i;}END{print a}' data.txt

: 2310777555 310544565
2310999999 2104444444...
2,274
Posted By Mark_orig
nawk -F ':' '!/:/ { printf "\n%s: ", $0 } {printf...
nawk -F ':' '!/:/ { printf "\n%s: ", $0 } {printf "%s ", $2 }' data.txt


and the same with awk.

Code tags?
2,274
Posted By Mark_orig
It doesn't work. I have this output: ...
It doesn't work. I have this output:

2310777555 310544565
2310999999 2104444444
2310542236 2 2310457863 2310996354


:(

Use code tags!
2,274
Posted By Mark_orig
all in one line-awk
I have a text with those data:

John Rose
Home: 2310777555 310544565
Mark Owen
Home: +302310999999
Office: 2310999999 2104444444
Steve Blade
Office: 2310888777 2310457863 2310996354
Mobile:...
2,604
Posted By Mark_orig
(https://www.unix.com/members/302011521.html)Thanks...
(https://www.unix.com/members/302011521.html)Thanks guys!
It works ! :) :b:
2,604
Posted By Mark_orig
edit fields awk
Hi there, i need some help please...
I have this text, it's name data.txt that contains the following information:

Mark Owen: 6999999888 6999999888 +302310999999 2310999999
Steve Blade Pit:...
Showing results 1 to 13 of 13

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