Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Nick1097
2,429
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,429
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 [...
1,631
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
1,631
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...
1,631
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
1,631
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...
1,631
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
811
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
811
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
1,835
Posted By Nick1097
substr work great.. thanks alot guys
substr work great.. thanks alot guys
Forum: Programming 04-10-2012
1,835
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,468
Posted By Nick1097
thanks again itkamaraj and ctsgnd
thanks again itkamaraj and ctsgnd
1,468
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,468
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,468
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,468
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,524
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,524
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,524
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,524
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 =...
827
Posted By Nick1097
oo.. so du still the best for size stuff
oo.. so du still the best for size stuff
1,548
Posted By Nick1097
ah ic... thanks again
ah ic... thanks again
827
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?
827
Posted By Nick1097
Small fast question
just to confirm
du from sh show sizes as multiples of 512 byte right?
1,548
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

 

Featured Tech Videos

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