All Questions
11 questions
1
vote
1
answer
59
views
Selecting from various media using awk shell script
I have made a simple backup program for my bin folder. It works.
Code and resultant STDOUT below.
Using rsync to copy from local ~/bin folder to a /media/username/code/bin folder. The code works fine ...
0
votes
0
answers
101
views
Personalize .txt files with data taken from a .csv file. (Replacing variables)
I want to customize text files for a big list of people. The dirs and files are made already. For each person there are 6 text files. The 6 text files together contain 7 variables: ${FULLNAME}, ${DOB},...
-1
votes
1
answer
2k
views
Bulk replace multiple variables in multiple files at once
Example: I have 40 different variables like $VAR in 100 .txt files which are located in /home/user/EXAMPLE/. How do I replace all variables in the 100 files?
To tell the system what the variables are ...
0
votes
2
answers
238
views
sed and awk in sh script not replacing text
The desired work to find a string, and replace to another (all occurrencies), and rewrite/update the file too.
The file is an pbxproj file. I linked a sample of this file
sample of the file (please ...
-1
votes
1
answer
107
views
How to move old logs - mysql logs [closed]
I need to move old binlogs to a directory and aso compress it before moving it to a new folder.
I have a space crunch because of which we am facing issues.
below commadn is not working.
ls -t binlog* |...
0
votes
1
answer
411
views
awk is not working for my requirement [duplicate]
My requirement is that shell script should print the folder name of the file.
For example comp.class is present in D:/Practice/HelloWorldPractice/bin folder, I should get output after executing ...
0
votes
1
answer
933
views
find the relevant files with their checksum
We want to find all the .jar files with their chksum.
find . -name "*.jar"
./lib/ant-1.8.0.jar
./lib/ant-launcher-1.8.0.jar
./lib/backport-util-concurrent-3.1.jar
./lib/classworlds-1.1-alpha-2.jar
./...
0
votes
1
answer
260
views
Using 'find' then searching each line for two values in bash script
Hello all I have a slew of files I search through with 'find' recursively then once all those file types are found I want to remove all records not matching this string on each line, in this order:
...
3
votes
1
answer
3k
views
Can i modify this search command to ignore binary files?
I have this command which gets generated by a little script i wrote called "scan", which I use all the time to look for specific content (variable names etc) inside text files:
find "." \
| awk '{...
1
vote
1
answer
1k
views
find command not giving any output
Please anyone know why this command is not giving me any output? allthe variables are correct but no result.
find . -name "$cdr_type*$DAYZ*.unl*" |
xargs zcat |
awk -F "|" '{if($14==$tdate && $22==...
1
vote
2
answers
1k
views
Multiple File Redirection with awk and find
I have some files in a directory. And I want to add some lines at top and end of file using awk.
Example: My awk command:
awk 'BEGIN { print "line1\nline2" } { print $0 } END { print "line3\nline4" }...