Get the App
SLTechnology News&Howtos  ›  Development  › 

A tutorial on how to copy 2 Shell script codes from N copies of a file

Shulou Source: shulou.com Published: 2022-06-03 08:21:14 11月15日 Update

This article introduces the relevant knowledge of "the method tutorial of copying N copies of 2 Shell script code". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The code is as follows:

#! / bin/sh

# file name: batchcp.sh

# author: zhouhh

# Email: ablozhou@gmail.com

# Date: 2008.3.31

Echo "input your file name"

Read FILENAME

Echo "how many times you want copy?"

Read TIMES

Echo "your file name is ${FILENAME}, you want to copy ${TIMES} times."

BASE= `echo ${FILENAME} | cut-d "."-f 1`

EXT= `echo ${FILENAME} | cut-d "."-f 2`

For ((iSuppli)

Tags: Code tutorials files methods scripts content more knowledge practicality learning and then dilemmas realities situations articles cases versions editing websites industries Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Shulou Tech Info Apple Xiaomi