Enter your email address & Win:

System Software Lab Programs ( UNIX Programs ) – 4a

// June 3rd, 2009 // Educational, Engineering, Unix and System Software Lab // Written by sandeephegde

-->

Subject : System Software Laboratory

Branch : Information Science & Engineering

Semester : 6

University : VTU

[Click Here to get other programs by email ]

………………………………………………………………………………………………………………………….
PART -B

………………………………………………………………………………………………………………………….

4. a) Shell script that accepts file names specified as arguments and creates a shell script that contains this file as well as the code to
recreate these files. Thus if the script generated by your script is executed, it would recreate the original files(This is same as the “bundle” script described by Brain W. Kernighan and Rob Pike in “ The Unix Programming Environment”, Prentice – Hall India).

#!/bin/bash

echo “# to unbundle,bash this file \n:”
for i
do
echo “echo $ i1>i2″
echo “cat >$i <<’END of $i’”
cat $i
echo “END OF $i”
echo -e
done

[Click Here to get other programs by email ]


If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. System Software Lab Programs ( UNIX Programs ) – 2a
  2. System Software Lab Programs ( UNIX Programs ) – 7a
  3. System Software Lab Programs ( UNIX Programs ) – 6a
  4. System Software Lab Programs ( UNIX Programs ) – 5a
  5. System Software Lab Programs ( UNIX Programs ) – 3a
blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes