Search Results

Search: Posts Made By: Nick1097
2,941
Posted By Nick1097
Oh right that "." , no wonder i feel like im...
Oh right that "." , no wonder i feel like im forgetting something.
Thanks a lot Scrutinizer
2,941
Posted By Nick1097
Call function from another script
Hey, i got this 2 file. When i try to pick option 1, which is test1, it says ./test: test1: not found.
Any idea on how i can fix it?



#!/bin/sh

QUIT=0
`dirname $0`/testfile

while [...
2,454
Posted By Nick1097
haha yeh ill try to remember that, used to java...
haha yeh ill try to remember that, used to java coding..

Thanks for the warning methyl, jim mcnamara and chakrapani
2,454
Posted By Nick1097
ah... i found the problem.. im in directory path2...
ah... i found the problem.. im in directory path2 and i go and type all the path...


directory = `dirname /path1/path2/path3/file.txt`

if [ -w "$directory" ]
then
echo $?
else
echo...
2,454
Posted By Nick1097
ok now that's funny.... it shows no such file or...
ok now that's funny.... it shows no such file or directory..., dont think i got typo..

using bourne shell, unix

yeh it's showing drwxrwxrwx
2,454
Posted By Nick1097
ah right, that's true haha.. tried that...
ah right, that's true haha..

tried that doesnt work too, still showing i dont have permission... even tho its showing that everyone got full drwxrwxrwx permission...
2,454
Posted By Nick1097
about -w
-w "filename"

is suppose to return 0 if the file got write permission and 1 if not right?

for some reason... when i test it, it keep returning 1 even after i set full 777 permission to that...
Forum: Programming 04-10-2012
951
Posted By Nick1097
lets see, for example <title>NICK</title> ...
lets see, for example

<title>NICK</title>
<description><![CDATA[<p>Thanks alot for helping.</p>]]>
<date>today</date>
<link>hi</link>for my program i output
...
Forum: Programming 04-10-2012
951
Posted By Nick1097
Perl: Question about stripping tags
hey 1 more question, how do you strip tags like <p></p> from output of xml with perl?

i already strip the CDATA but the annoying <p></p> still there
Forum: Programming 04-10-2012
2,312
Posted By Nick1097
substr work great.. thanks alot guys
substr work great.. thanks alot guys
Forum: Programming 04-10-2012
2,312
Posted By Nick1097
Limit line for perl
Hey guys, can help me out with this?

How do i limit output for xml to 50 character?
i tried *below* but doesnt work, it still print more than 50 characters.

Thanks in advance

printf...
1,943
Posted By Nick1097
thanks again itkamaraj and ctsgnd
thanks again itkamaraj and ctsgnd
1,943
Posted By Nick1097
thanks ctsgnb, for the sed, still learning to use...
thanks ctsgnb, for the sed, still learning to use sed. That sed code will become handy to me .
1,943
Posted By Nick1097
@ Carlom - yes as balajesuri said, it's not...
@ Carlom - yes as balajesuri said, it's not supported. no such option

@balajesuri , oh i see, need to write that down for future reference.

Thanks again CarloM and balejesuri
1,943
Posted By Nick1097
ah great... hmm sed , time to look up sed ...
ah great... hmm sed , time to look up sed

btw the size of directory without sub is
du -S
that's what i got from the linux library i've been reading.
but for some reason when i type that in my...
1,943
Posted By Nick1097
Question about grep
is there anyway i can ask grep to only get the first line?
as in the top command line

line 1 <-- just grep this line
line 2
line 3

---------- Post updated at 04:24 PM ---------- Previous...
1,898
Posted By Nick1097
i see so that's why brackets doesn't work but ...
i see so that's why brackets doesn't work but
t=`expr $t + $s`
should work on bourne too right?

---------- Post updated at 12:45 PM ---------- Previous update was at 12:43 PM ----------

oh i...
1,898
Posted By Nick1097
bracket doesn't work, maybe cause it's sh? but...
bracket doesn't work, maybe cause it's sh? but backticks work
not on this (below)
i though this is suppose to work? judging from http://cis.stvincent.edu/html/tutorials/unix/bshellref
i'm...
1,898
Posted By Nick1097
u mean? s=`expr ls -s Documents | grep Music...
u mean?

s=`expr ls -s Documents | grep Music | awk '{print $1}' ` doesnt work too.. i even tried {Documents} {Music}
none work

---------- Post updated at 12:04 PM ---------- Previous update...
1,898
Posted By Nick1097
Question about syntax error
first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe

s = `expr ls -s Documents | grep Music | awk '{ print $1 }' `
t =...
1,122
Posted By Nick1097
oo.. so du still the best for size stuff
oo.. so du still the best for size stuff
2,169
Posted By Nick1097
ah ic... thanks again
ah ic... thanks again
1,122
Posted By Nick1097
great thanks methyl ---------- Post updated...
great thanks methyl

---------- Post updated at 10:28 AM ---------- Previous update was at 10:22 AM ----------

same as ls -s? ls -s default 512 too right?
1,122
Posted By Nick1097
Small fast question
just to confirm
du from sh show sizes as multiples of 512 byte right?
2,169
Posted By Nick1097
hmm if i use ls -Rs | grep / does it...
hmm if i use
ls -Rs | grep /

does it print out all it's sub directory and it's size?

---------- Post updated at 08:45 AM ---------- Previous update was at 08:45 AM ----------

oo it's just...
Showing results 1 to 25 of 40

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