Skip to content
Advertisement

Tag: command-line

grep to read exact data from text file

I have file test1.txt file, i am trying to read variable which is enclosed in double quotes and starting with hyphen for eg: “-color”. i trying to use this grep command cat test1.txt | grep getParm | sed ‘s/getParm(/ /;s/&/ /;s/,/ /;s/”/ /g’ | awk ‘{print $3}’ , where i am not able to read exact data for all variables

How to follow latest log file with tail -f?

I have a dir that saves a fresh log file for each run, so I use the following command to follow the latest log file: So my question would be if there is any way to jump from one file to the next, if there is a newer log file available without having to stop the latest tail -f and

moving and renaming a folder in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

Printing full path of directories

I am trying to get full paths of folder and print them into a into a file. I have been using this command to get paths. But they are not proper. Ex. When trying to print path of Documents/Folder/Folder2 comes as Documents/folder2 instead of proper path. I have tried going over directory using for loop and printing out solution like

Execute mirror and mget lftp commands in bash script

Current code Objective Download all csv files and mirror my local directory folder with the remote server, so when the code is run again it won’t download a second file. Error received open: *.csv: Name or service not known Comments From what I understood of the lftp man page I should be able to get all wildcard files by using

Advertisement