Get the extension of file
Bash |
https://codedump.io/share/61vSaWelI8G
|
I have files with "multiple" extension , for better manipulation I would like to create new folder for each last extension but first I need to retriev...
4 years ago
How would I chown everything found by grep
Bash |
https://codedump.io/share/cxf7jETZFOc9
|
I am looking to chown all files that contain the word "hi"
I currently have
grep -r $1 $2
if [ $? -eq 0 ]; then
echo "Found text"
ec...
4 years ago
Shell script help for reading in file
Bash |
https://codedump.io/share/wcCpxi0huHK
|
I have an assignment where I am reading in a file, here is my code
#Reads in file
while read line; do
echo `wc -l` "is the number of students in the ...
4 years ago
Check folder size in bash
Bash |
https://codedump.io/share/H25LwtxHVfKq
|
I'm trying to write a script that will calculate a directory size and if the size is less than 10GB, and greater then 2GB do some action.where do i n...
4 years ago
How to create array with single quotes in Bash?
Bash |
https://codedump.io/share/0HqfEE23wMq
|
I have this list/array:
declare -a LISTNODES=('servername node="{'region': 'primary', 'zone': 'east'}"' 'servername node="{'region': 'primary', 'zone...
4 years ago
How to output the sips image in directory
Bash |
https://codedump.io/share/CFCXAOYBgwbM
|
sips --resampleWidth 300 --out ./changedPic/A.png ./Normal/A.png
I did this command in shell.
however it didn't make the A.png under changedPic di...
4 years ago
How do I tell what type my shell is
Bash |
https://codedump.io/share/uSPeV5wWC6MR
|
How can I tell what type my shell is? ie, whether it's traditional sh, bash, ksh, csh, zsh etc.
Note that checking $SHELL or $0 won't work because $...
4 years ago
Replace NULL string pattern with blank
Bash |
https://codedump.io/share/uRLZIRiwKEmB
|
I have a pipe delimiter file in which i need to replace NULL string with blank.
file is very huge around 9 GB and contain 2 million records and has 15...
4 years ago
How can I force PHP Version for Command Line?
Bash |
https://codedump.io/share/eOGpCzGF2VL8
|
I am hosted with 1and1.com, and I have setup my files to be parsed with php5 using .htaccess.
But that only works in apache, and not in command line,...
4 years ago