[LINUX] I want to get information from fstab at the ssh connection destination and execute a command

I'm trying to read the fstab of the connection destination and unmount only the specific mount destination. The following script will read the connection source fstab. How can I load and operate the fstab at the connection destination?


fstsb=/etc/fstab while read line; do expect -c " spawn echo $line |grep 10.200.xxx.xxx | awk -F " " '{print "umount " $2}' expect "~]# " " done </etc/fstab

Recommended Posts

I want to get information from fstab at the ssh connection destination and execute a command
I want to make a music player and file music at the same time
I want to automate ssh using the expect command!
I want to automate ssh using the expect command! part2
I want to get the operation information of yahoo route
I tried to get various information from the codeforces API
I made you to execute a command from a web browser
I want to record the execution time and keep a log.
I want to connect remotely to another computer, and the nautilus command
I want to extract the tag information (title and artist) of a music file (flac, wav).
I want to send a signal only from the sub thread to the main thread
[Python memo] I want to get a 2-digit hexadecimal number from a decimal number
I want to use only the SMTP MAIL FROM command and RCPT TO command without sending mail with Python's smtplib
I want to pass an argument to a python function and execute it from PHP on a web server
Create a command to get the work log
[LINE Messaging API] I want to send a message from the program to everyone's LINE
The story of IPv6 address that I want to keep at a minimum
I want to drop a file on tkinter and get its path [Tkinter DnD2]
I made an appdo command to execute a command in the context of the app
I want to get / execute variables / functions / classes of external files from Python
[Python] I tried to get the type name as a string from the type function
I want to get the file name, line number, and function name in Python 3.4
I want to see the file name from DataLoader
[Python] I made a system to introduce "recipes I really want" from the recipe site!
I made a command to markdown the table clipboard
I want to publish the product at the lowest cost
[Memorandum] ① Get and save tweets ~ I want to identify the news tweets that are spread ~
I want to use Linux commands at the command prompt! Use Linux commands at the command prompt instead of Git Bash
I want to increase the security of ssh connections
I want to cut out only the face from a person image with Python and save it ~ Face detection and trimming with face_recognition ~
I want to change the symbolic link destination of / lib64 from / usr / lib64 to / my-lib64 on CentOS
I made a tool to get the answer links of OpenAI Gym all at once
I want to get rid of import warnings from Pyright and pylint in VS Code
How to start the PC at a fixed time every morning and execute the python program
I want to find the intersection of a Bezier curve and a straight line (Bezier Clipping method)
I tried to get the location information of Odakyu Bus
Get UNIXTIME at the beginning of today with a command
I want to start a jupyter environment with one command
[Python] I want to get a common set between numpy
[Postgresql] SSH connection to the external DB server from the client
I tried to get Web information using "Requests" and "lxml"
I want to start a lot of processes from python
I want to calculate the allowable downtime from the operating rate
I want to install a package from requirements.txt with poetry
I want to send a message from Python to LINE Bot
I want to know the features of Python and pip
I want to map the EDINET code and securities number
Keras I want to get the output of any layer !!
I want to create a Dockerfile for the time being.
Create a model to store information from the Google Books API for intuitive handling and testing
I want to create a histogram and overlay the normal distribution curve on it. matplotlib edition
I want to clear up the question of the "__init__" method and the "self" argument of a Python class.
I want to get the name of the function / method being executed
I want to automatically find high-quality parts from the videos I shot
How to get followers and followers from python using the Mastodon API
How to get a string from a command line argument in python
[EC2] How to install and download chromedriver from the command line
I want to create a system to prevent forgetting to tighten the key 1
Scraping and tabelog ~ I want to find a good restaurant! ~ (Work)
I want to create a pipfile and reflect it in docker
I want to make a parameter list from CloudFormation code (yaml)