Archive

- Posts Tagged ‘shell’

Linux: Shell Script for Printing Full Path with Filename

Here is a shell script for printing full path with filename. Suppose you have given your shell script a file name=realpath then It will work like this: $realpath filename.txt /home/satya/filename.txt $realpath folderName /home/satya/f1.txt /home/satya/f2.txt, etc It just print files one level deep. #!/bin/sh #find $PWD -name $1 2>/dev/null #find $PWD… (Continue)

Writing Shell Script in Linux/Unix

Today I have tired with shell script which are meaningful and it is something I will remember as well.  Lets first discuss about writing sample shell script! 1. Decide about a place to place your shell scripts. Usually it can be /home/yourUserDir/bin (/home/satya/bin) So, create a directory if it does… (Continue)