I want my code to execute from a file on disc, is this possible


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers I want my code to execute from a file on disc, is this possible
# 1  
Old 02-15-2012
I want my code to execute from a file on disc, is this possible

I am pretty new to Unix and am on a Solaris 10 system. I am just curious if doing something like this is possible....

I have files on a disc that need to all be moved to a simple file, obviously i would just

cp *.* /usr/tester

but after they are there I want to enter these lines

chown^faad:faad^*.sim
typeset^-u^t
typeset^-l^e
for^f^in^*.*
do
t=${f%.*}
e=${f##*.}
mv “$f”^”$t.$e”
done

is it even possible to input all of these files into a script or a program and have it move the files to the directory, and then do the lines listed above with just an executable file? I ask because of the sheer number of systems that this has to be done on daily.

Thank you.
# 2  
Old 02-15-2012
Is this a security thing, or space, or ???

All UNIX executable are on a disk, but execution happens on images copied page by page to RAM, essentially mmap(). Heap and stack are on allocated swap space, if rolled out of RAM. Of course, actual execution in the CPU may use copies of RAM words in level 1 or 2 cache! Smilie

  • A symbolic link (ln -s) can make any directory or file appear anywhere in any name.
  • A mount can also make directories show up other places.
However, if you need to change permissions/owner/group, you have to change the original or use a copy.
  • Sometimes, you can give that same access by creating matching groups and add the users to those groups.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to execute a part of code at particular time

I had to execute the following code at 10:00 AM if then echo "Job done"; fi But this is not the entire piece of code, this is sub part of code which alone is to be executed at 10:00 AM, could anyone help me with this? (1 Reply)
Discussion started by: kishore kumar
1 Replies

2. Programming

Execute code in kernel mode.

Hi everyone. I would like to hook a system function (gettimeofday) to modify it. I guess I'll need kernel mode to do that. By the way, how could I do it (c++ or c)? I want to modify that function for one process which I know the PID. So I need to return my own value for that PID and real value... (29 Replies)
Discussion started by: lilezek
29 Replies

3. Shell Programming and Scripting

Encrypt source code or Provide execute only permission

To perform a black box testing and get users' feedback, we are planning to deploy a script in a common location and ask users to execute the script. However we do not want them to have a look at the script until the testing is done. I know this is against the open source concept, but it will be for... (7 Replies)
Discussion started by: krishmaths
7 Replies

4. Shell Programming and Scripting

Need a script find the folders and execute a code

I need a script which can search for two files in location /share/point/ which has year and month stamps example 1) Extract200806.txt 2)file_new200805.csv If these files exists then it should run a code named abc.sas (3 Replies)
Discussion started by: reachsarath
3 Replies

5. Solaris

Ultra 10 - Copying Files From Disc After Booting Up With Recovery Disc?

Hello, I'm still learning unix and I have what is probably a simple question but I can't seem to find the question to. I have an Ultra 10 Sparc Server running solaris 8 and the drive may have crashed (I hope not). Currently, it appears some files in the /etc folder are missing. I have a backup... (1 Reply)
Discussion started by: ideffects
1 Replies

6. Solaris

File system and disc mount

Hello All Well i m using sun fire and I want to view file system on each disc mount then what will be the commands?...like i want to get each disc like c0t0d0s0 and others and i want to see directories and files distributed on each discs.... with heartiest greetings nilanjan (7 Replies)
Discussion started by: ailnilanjan
7 Replies

7. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies

8. Shell Programming and Scripting

how to execute C code in linux machine

Hi. I have a C code i want to run that code in linux machine. i tried with CC command. but CC command not in my bin dir. how to run that script. regards rajan (3 Replies)
Discussion started by: rajan_ka1
3 Replies

9. Shell Programming and Scripting

how 2 execute conbal code in unix

hi this is sushil i hav a querry that how to execute a cobal code in unix environ ment plz help regards sushil (1 Reply)
Discussion started by: sushil_d10
1 Replies
Login or Register to Ask a Question