Skip to navigation Skip to content
Simon Technology Blog
  • Architecture
  • Cloud
  • Database
  • Develop
  • Hardware
  • Industry
  • Language
  • Mobile
  • Opensource
  • OS
  • Web
Main Navigation

Tag: BASH

Regular expression – How to use an abnormal wildcard in Bash?

See answer in English> Automatically ignore files in grep 6
I want to grep multiple files in the folder. In addition to large files like pcap files and gziped files, I want to render them a lot. So

October 18, 2021By Simo Regexp abnormal, BASH, expression, How, regular, wildcard, with tapeLeave a Comment

Bash – Add multiple lines at the beginning of the file

I have many files in the same subdirectory as follows:

10 A
11 T
12 A
13 C
15 A Two columns, the first line always starts with the number 10.

I just want to Add lines 1-9 at the beginn

October 18, 2021By Simo Unix Add, BASH, file, line, More, StartLeave a Comment

Bash or Python for changing file spacing

I have a set of 10,000 files. In all of them, the second line looks like:

AAA 3.429 3.84 So there is only one space between AAA and the other two columns (required). The rest of the lines on

October 18, 2021By Simo Unix BASH, change, file, for, python, spacingLeave a Comment

Bash – single quotes of characters AWK scan string

I have a line and I want to know if there are any embedded single quote characters in it. Using awk, I tried several variations

badix = index($0,”47″) – this does not find it
badix = index($

October 18, 2021By Simo Unix AWK, BASH, Characters, quotation marks, scanning, single, stringLeave a Comment

Bash scripting “[!: Not found” error, and how to write or declare

Edit:
This is my updated code:

#!/bin/sh
files=`ls`
if [$# -ne 1 -o -f $1 ]
then
echo “Usage: $0 ”
exit 1
fi
if [! -e $1 ]
then
echo “$1 not found”
exit 1
elif [-d $1 ]then
cd $1
for f

October 18, 2021By Simo Unix and, BASH, Declaration, error, How to Write, scriptingLeave a Comment

Bash – Extract many pre-guides from a huge text file

I have a huge text file. I want to extract the first 532541 lines of it and store them in another file. Selecting the text with the mouse and executing ctrl c is obviously not a feasible Solution.<

October 18, 2021By Simo Unix BASH, Document, extraction, Huge, line, Many, Medium, one, preamble, TextLeave a Comment

Why will I call the bash command from Ruby?

I am trying to use Ruby to execute the following bash commands on some images:

class Pingcrush
def initialize
Dir.foreach(‘drawable’) do |item|
next if item ==’.’ or item ==’..’
# do work

October 6, 2021By Simo Ruby BASH, call, Command, error, ruby, thrown, why, willLeave a Comment

51NOD1070 BASH game V4

Problem There are N stones in a pile. A and B take turns to take, A takes first. The minimum amount taken each time is 1, and the maximum shall not exceed twice the amount taken by the opponent las

August 22, 2021By Simo Unix 51NOD1070, BASH, game, NOD, V4Leave a Comment
Recent Posts
  • Sencha-Touch-2 – Sencha Touch 2, Nested XML Analysis NodeValue
  • Add a separation line and format XML content
  • Is there a norm of simplified XML subsets?
  • Look at it when you write React
  • ReactJS – Present React Redux React-Router App to add the server to the Firebase hosted by the Firebase
Categories
  • Android
  • Apache
  • Apache Kafka
  • Asp
  • Auto-Test
  • Automated Build
  • Aws
  • Bitcoin
  • Browser
  • C & C++
  • C#
  • Centos
  • Cgi
  • Character
  • Cloud Service
  • Cocos2dx
  • Cordova
  • CSS
  • Data Structure
  • Delphi
  • Design Pattern
  • Dojo
  • Dubbo
  • ELK
  • Flex
  • football
  • Game
  • Hadoop
  • Hibernate
  • HTML
  • Hybrid
  • Intel
  • IOS
  • Ipad
  • iPhone
  • Java
  • Javascript
  • Jetty
  • JQuery
  • Jsp
  • Linux
  • Load Balance
  • Lua
  • Macbook
  • Macos
  • Mathematics
  • Micro Services
  • Monitoring
  • Motherboard
  • Mysql
  • Network Hardware
  • Network Marketing
  • Nginx
  • NodeJs
  • Nosql
  • Oracle
  • Os Theory
  • Performance
  • PHP
  • Postgresql
  • Power Designer
  • React
  • Redis
  • Regexp
  • Rom
  • Rss
  • Ruby
  • Search Engines
  • Shell Script
  • Silicon Valley
  • Silverlight
  • Software Design
  • Spring
  • Sql
  • Sqlite
  • Sqlserver
  • Storage
  • Storm
  • Surface
  • SVN
  • Swift
  • System Architecture
  • Tablet
  • Uncategorized
  • Unix
  • Visual Basic
  • Visual Studio
  • Web Crawler
  • WebService
  • Windows
  • Wireless
  • XML
  • ZooKeeper
Archives
  • October 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • September 2020
  • September 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
© Simon Technology Blog 2025 • ThemeCountry Powered by WordPress