Shell gets the file name extension

cos

basename example.tar.a.b.c.gz. c.gz # => example.tar.a.b file= " example.tar.gz" echo "${file%%.*}" Fetch Head Example # => example echo "${file%.*}" go tail example.tar.a.b.c # => Example.tar echo "${file#*.}" Go head

Java code invokes shell script and passes in parameter implementation DB2 database table export to file

This article calls the shell script through Java code and passes in the parameter implementation DB2 the database table exports to the file, the code is as follows:Import Java.io.file;import java.io.ioexception;import

Shell Programming Basics (i)

First, Shell historyThe role of the shell is to explain the execution of the user's commands, the user enters a command, the shell interprets the execution of one, which is called Interactive (Interactive), and the shell has a way of executing the

Shell grooming (27) = = = Uppercase and lowercase letters replace modified file names

(a) Title:(1) Create a folder(2) There are 10 files in the folder that begin with any letter or number(3) If the first digit in the beginning does not change(4) If the first letter at the beginning is changed to uppercaseFor example, the modified

Problem solving in shell that only loops the first row when using while loop ssh

Recently writing a shell script, I would like to use a For loop to read the contents of the file, but found that every line in the file has a space, obviously with a for loop does not work, my intention is to read a row of the file content, so

Beginner's "Linux Programming" learning-shell Script

1. Understanding Shell Scriptshell Script is a "program" that uses the shell's function abbreviation, which uses plain text files to write some shell syntax and commands (including external commands) in it, with regular expressions, pipeline

Shell Process Control statement if and for case

The Linux shell has its own process Control statement, which includes a conditional statement (if), a looping statement (For,while), and a SELECT statement (case). I'll use the example below to illustrate how each statement is used.One, Shell

Explanation of the meaning of shell variable $#,$@,$0,$1,$2 in Linux

The meaning of shell variable $#,[email protected],$0,$1,$2 in Linux is explained:Variable Description:$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return

Linux Learning Notes (*) Shell Basics Bash Basic Features

1 shell overviewThe shell is a command interpreter that provides the user with an interface system-level program that sends a request to the Linux kernel to run the program. The user can start, suspend, stop, or even write some programs with the

Shell Authentication IP

#!/bin/BashfunctionisIp () {IP=$1 if[ `Echo$IP |awk-F.'{print NF}''-ne4]; Then Echo "wrong ip!"Exit2 Elsea=`Echo$IP |awk-F.'{print $}'' B=`Echo$IP |awk-F.'{print $}'' C=`Echo$IP |awk-F.'{print $}'' d=`Echo$IP

Easily manage RADIUS servers with Linux shell scripts

The company's wireless environment uses the MAC address authentication method, the MAC address is bound to the radius of the users configuration file, the registered MAC address as the user name and password. In order to manage these MAC addresses

Awk of the Linux-shell script command

[Introduction to awk: ]awk can get some of the content from a single text, or format the text so that it is output in some way.[awk Workflow: ]awk will take the file line into memory and then segment the line (by default by Space or tab, $, $, $ .

Use the wscript. Shell object to hide the implementation code of the CMD command line runtime box

1. wscript. shell (Windows Script Host Runtime Library) is an object corresponding to c: \ windows \ system32 \ wshom. OCX, wscript. shell is a component used by the server system. Shell is the meaning of "shell". This object can perform common

Linux Shell programming Basics

In Linux, you can specify an alias for an alias command: in Linux, if the command is too long and does not conform to the user's habits, you can specify an alias for it. Although you can create a "Link" for a command to solve the problem of long

Shell syntax error: unexpected end of file error message

Original post: http://topic.csdn.net/u/20071101/11/4bf1047d-dc46-4b39-9766-4f05b0eeaca7.html Shell syntax error: unexpected end of file error message [Closed, closed by: myepoch] Add as a friend

Use Shell extension to implement the source code Statistics Program)

Use shell extension to implement the source code statistics program Author/king_dxs Download source code I. PrefaceIn the Windows Resource Manager window, we have seen software such as WinZIP and WinRAR that can add several menu items to the default

Introduction to if else and logical expressions greater than, less than, or equal to in linux shell

For example, to compare strings, determine whether a file exists, and whether the file is readable, "[]" is usually used to represent a conditional test. Note: spaces are important. Make sure that the square brackets have spaces. I used to waste a

Parameters and usage of Stream, WshShell, WshUrlShortcut object, and Shell. Application

Kafree collection Source: The source cannot be determined for Forum reprinting. Please contact us if you have any copyright questions. 1. Stream Object Component: "Adodb. Stream" There are the following methods: Cancel Method The usage is as

Linux login & amp; non-login shell and su, sudo related concepts, linuxlogin

Linux login & non-login shell and su, sudo related concepts, linuxlogin1. login & non-login shell In Linux, the kernel will create the init process to perform a series of system initialization operations. When a user logs on to the shell, the

Use an automated shell script to find detailed thread information used by the CPU.

Use an automated shell script to find detailed thread information used by the CPU. After some interceptor code is added to the project, the CPU alarm shows that the CPU usage exceeds 100%; If you want to find out which code consumes too much

Total Pages: 541 1 .... 53 54 55 56 57 .... 541 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.