Search Results

Search: Posts Made By: linuxkid
4,267
Posted By linuxkid
Need help with basename command
I have a file

fileinput.txt:

File home/me/fileA.doc is size 232
File home/you/you/fileB.doc is size 343
File /directory/fileC.doc is size 433
File /directory/filed.doc cannot find file size...
2,199
Posted By linuxkid
[Solved] Multiple array problem in NAWK
I HAD these 2 files:

file1

pictures.txt 5 ref2313 4 ref2345 3 ref5432 2 ref4244 1
dance.txt 6 ref2342 5 ref2352 4 ref0695 3 ref5738 2 ref4948 1
treehouse.txt 6 ref8573 5 ref3284 4 ref5838 3...
2,170
Posted By linuxkid
Yep that good!! Thanks!
Yep that good!! Thanks!
4,646
Posted By linuxkid
sorry to bring this up again, but since this...
sorry to bring this up again, but since this answer theres been a few changes in my input file,mainly the addition of a new set of numbers


abcf-p-ssa-a322f-s-4312
def-abcf-p-ssa-a322f-s-4312 ...
2,170
Posted By linuxkid
[Solved] getopts problem
How do I get the getopts command to display whats written at my help option if no option is types in? For example,

myscript.sh -h


will bring up my help option, however, I also want
...
3,426
Posted By linuxkid
why not just use your text editor to do it for...
why not just use your text editor to do it for you? In the options do you not have a "status line" option or anything? or does it HAVE TO BE a command you want?
2,949
Posted By linuxkid
my mistake pravin, i forgot the '(' next to the...
my mistake pravin, i forgot the '(' next to the first 'date'. But yea, do you think we could change this so it meets also does what I said to Ahmad in my last post?
2,949
Posted By linuxkid
theres 9 brackets '(' in this so its coming up...
theres 9 brackets '(' in this so its coming up with unmatched brackets error!

---------- Post updated at 01:54 PM ---------- Previous update was at 01:51 PM ----------



thank you ahmad!...
2,949
Posted By linuxkid
Same output as in my first post ...
Same output as in my first post


date-01/01/01
time-2110
ref/0001
this should remain
this should remain
2,949
Posted By linuxkid
my apologies as I probably didn't explain this...
my apologies as I probably didn't explain this problem the best that I should have. The input file may have many other words on the line, both after and before before the keyword, so the $1$2 would...
2,949
Posted By linuxkid
Perl command help needed
#!/bin/bash
perl -nle'
/(?:date|time|ref)/ and print join " ", /(?:date|time|ref)[\w-]+/g
or print
' inputfile


Problem I have is that I want to delete words that are on...
2,155
Posted By linuxkid
Need some help with a regex if loop problem
Need some help with a regex if loop problem.
File1:

2323
3232
4230
3230
4340
4343
233
32320

I want to print "Zero" if the number ends with a zero, but print "number" if it does not!
...
2,858
Posted By linuxkid
thats greeeeeeeeaaaaattt!!!
thats greeeeeeeeaaaaattt!!!
2,858
Posted By linuxkid
no sorry im not! forget the then it worked ok...
no sorry im not! forget the then it worked ok bit! because it hasnt!
2,858
Posted By linuxkid
my mistake, but with the input file some lines...
my mistake, but with the input file some lines have 2 words on it (can be any word), whilst others may have jsut the one on it. I tried replacing the NF==1 with NF==2 but that didn't work properly,...
2,858
Posted By linuxkid
Need to delete previous lines
Need to delete the line which is directly above any line which has 3 fields in it.

one two three
one
two
three
four five six
four
five
six
seven eight nine
seven
eight
nine
one two...
2,020
Posted By linuxkid
world class mate! i almost had that! jsut had the...
world class mate! i almost had that! jsut had the \b on the wrong side of the 0! thanks!!
2,020
Posted By linuxkid
im putting it into a nawk, as im using solaris. I...
im putting it into a nawk, as im using solaris. I tried your first one though on this:
Regular Expression Calculator (http://www.codehouse.com/webmaster_tools/regex/)

and it doesn't work, should...
2,020
Posted By linuxkid
Regular expressions help
need a regex that matches when a number has a zero (0) at the end of it
so like
10
20
120
30
330
1000
and so on
6,109
Posted By linuxkid
thanks for the reply, unfortunately although it...
thanks for the reply, unfortunately although it ran and everything, it has a problem with files if their version number is 1.10, as it see's this as the same as 1.1. So,
File1

treehouse.txt 1.2...
7,524
Posted By linuxkid
oh ok, so its more about the context its used in...
oh ok, so its more about the context its used in rather than having one concrete meaning?
7,524
Posted By linuxkid
:s okkaaayy. is this because its in a if...
:s okkaaayy. is this because its in a if statement? as im thinking if thsi was just outside the if statement then it would assign the value? am i right? Also as he's using ksh, would he use the same...
7,524
Posted By linuxkid
yes thought you may, instead of the single '=',...
yes thought you may, instead of the single '=', try replacing it with '=='
e.g.

if [[ "$Name1" == "$Name2" ]]
then
# at this point we know they are equal
else
# at this point we...
7,524
Posted By linuxkid
jim why is it '=' and not '=='? Doesn't the '='...
jim why is it '=' and not '=='? Doesn't the '=' assign the value of name2 to name1, whereas the '==' will compare it?
6,109
Posted By linuxkid
mmm ok maybe I didn't explain it clearly in...
mmm ok maybe I didn't explain it clearly in post18, so i'll try again. When I version the files, I HAVE to have a "1." at the start of it, so version 1 becomes version 1.1, version 2 becomes 1.2,...
Showing results 1 to 25 of 66

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