Find the answer to your Linux question:
Results 1 to 2 of 2
Hi i am trying to pack several file into one. The code i am using is case $# in 0) echo "Usage: Enshar file [...]" >&2 ;; *) for file ...
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    4

    Pack several files

    Hi i am trying to pack several file into one. The code i am using is
    case $# in

    0) echo "Usage: Enshar file [...]" >&2
    ;;

    *) for file
    do ls $file > /dev/null 2>&1

    if [ $? -ne 0 ]
    then echo "enshar: $file: doesn't exist" >&2
    exit 0


    else dir=`dirname $file`
    if [ ! $dir = . ]
    then echo "enshar: $file: can't be a pathname" >&2
    exit 1
    Can u please try to write this code with different commands.Is very important.Thank u....

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    I don't understand what you want to do. Please clarify.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...