Search Results

Search: Posts Made By: justchill
3,581
Posted By radoulov
No, unless you invoke the script as: ksh...
No, unless you invoke the script as:

ksh <script_name>sh is a KornShell variant by default on limited number of systems (it is on HP-UX for example, on Solaris it's the old Bourne shell, on Linux...
3,581
Posted By radoulov
Try: ./file.shWhen you invoke the script as...
Try:

./file.shWhen you invoke the script as sh file.sh the shebang line is ignored.
5,378
Posted By zaxxon
If the files are directly in the login directory...
If the files are directly in the login directory of that user, the lower one will work. The upper one most probably not, because ^ looked like a regular expression and not part of the filename that...
14,686
Posted By ahamed101
Your code, made some minor modifications ...
Your code, made some minor modifications


#!/bin/ksh

dirpath=login #sample directory
for dir in ${dirpath}
do
cd ${dir} # move to the respective dir and then do ls
for i in...
14,686
Posted By michaelrozar17
As you have said ${dirpath} has more than 100...
As you have said ${dirpath} has more than 100 directories, i assume those to be at different location and not just under the directory where the script is stored.
16,695
Posted By Scrutinizer
awk '!NF{p=0}p;/restart_step/{p=1}' infile
awk '!NF{p=0}p;/restart_step/{p=1}' infile
16,695
Posted By michaelrozar17
does this help.. sed '/<restart_step>/,/^$/!d'...
does this help..
sed '/<restart_step>/,/^$/!d' inputfile
16,695
Posted By pravin27
try this, awk...
try this,

awk 'BEGIN{RS="\n\n";FS="<restart_step> ="} { print $2}' inputfile
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 06:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy