UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
January
Su M Tu W Th F Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Sponsored Links
Latest Postings
那天,她留下了眼泪
by lmnopq127978
Today at 04:09 AM
繁荣如锦,似梦似幻
by lmnopq127978
Today at 04:08 AM
爱笑
by lmnopq127978
Today at 04:07 AM
江南小镇
by lmnopq127978
Today at 04:07 AM
癫痫病能够吃油炸食品吗
by lmnopq127978
Today at 01:16 AM
癫痫病的饮食应当留神哪些
by lmnopq127978
Yesterday at 07:09 PM
Latest Reviews
Topic Options
Rate This Topic
#16440 - 07/07/03 07:57 PM help: IFS in /bin/sh
bellini Offline
Junior Member

Registered: 06/18/02
Posts: 2
i've ben trying to make something work but still havent figured something out.
I do the following:
[user@host ~]$ IFS=/
[user@host ~]$ export IFS
[user@host ~]$ PATH=.:$PATH
[user@host ~]$ echo "/bin/sh" > bin
[user@host ~]$ chmod 755 bin

Now the problem is:
if I execute 'sh -c "/bin/ls"' it just does a simple ls
But if i do 'sh -c "sh -c \"/bin/ls\""' it does what i expected (it executes the file 'bin')

Why doesn't it does the same in the first example??

thank's for your spent time.

Top
Sponsored Links
      
#16441 - 07/07/03 09:57 PM Re: help: IFS in /bin/sh
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: Pimpin the Colorizzle
You don't need the quotes...

Code:
$ sh -c /bin/ls
filea fileb filec filed

Top
#16442 - 07/07/03 11:10 PM Re: help: IFS in /bin/sh
bellini Offline
Junior Member

Registered: 06/18/02
Posts: 2
Yes i know that gives me the list of files in the directory, but what i was expecting is to execute with that very same command line the program bin,due to my configuration of my IFS in sh.

Top

Moderator:  Infinite 
Featured Member
Registered: 10/28/14
Posts: 1
Forum Stats
2153 Members
46 Forums
36603 Topics
71773 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 29758
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
claralobo, cdefgh368568, HushHush, golqm, Tim050
2152 Registered Users
Who's Online
1 registered (lmnopq127978), 235 Guests and 228 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!