10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
#!/usr/bin/ksh
a="Run successfully"
cd $APPS
ls -l *.txt | while read $txt
do
if then
cp $APPS/$txt cp $hist/$txt
else
rm $APPS/$txt
echo "Files has been removed"
fi
done
New in shell script please help me out
Around 100 txt files in $APPS dir i want to search pattern from... (8 Replies)
Discussion started by: Kalia
8 Replies
2. Shell Programming and Scripting
Want to fetch a column with multiple pattern using awk.
How to achieve the same.
Tried
cat test
address : 10.63.20.92/24
address : 10.64.22.93/24
address : 10.53.40.91/24
cat test | awk '{print $3}' |awk -F "/" '{print $1}'
10.63.20.92
10.64.22.93
10.53.40.91
Is there any... (2 Replies)
Discussion started by: Manasa Pradeep
2 Replies
3. Shell Programming and Scripting
Hello :)
I have this file
cat employee_list
Name : jack
Gender: m
ID : 4512
DOB : 03/27/1980
hire date : 04/23/2012
Nationality: US
marital status : single
=====================
Name : mick
Gender: m
ID : 1256
DOB : 03/27/1970
Hire date : 012/10/2011
Nationality: US
Marital... (4 Replies)
Discussion started by: Sara_84
4 Replies
4. Shell Programming and Scripting
Sed replace using same pattern repeating multiple times in a line
I have text like below in a file:
I am trying to replace the above line to following
How can I acheive this?
I am able to do it if the occurrence is for 1 time:
But If I try like below
I am getting like this:
I have to... (4 Replies)
Discussion started by: sol_nov
4 Replies
5. Shell Programming and Scripting
hey mates,
I was wondering if someone could assist me with this one, I have couple scripts that I would like to invoke from .sh ( One after another )
Script1
Script2
Script3
Is it possible to run script 2 after script one finished running ? And again start script 3 after script 2... (6 Replies)
Discussion started by: NDxiak
6 Replies
6. Shell Programming and Scripting
Hi Guys,
What I am looking at doing is to run a C program in my home directory, but output files in multiple directories BUT not at the same instance.
For e.g.
1st instance:
Run program.c and output results in path /aaa/bbb/ccc/
2nd instance:
Run program.c again and output results... (9 Replies)
Discussion started by: Jatsui
9 Replies
7. Shell Programming and Scripting
guys,
I need to know how to assing pattern matched string as an input command variable. Here it goes'
My script is something like this.
./routing.sh <Server> <enable|disable>
## This Script takes an input <Server> variable from this line of the script ##
echo $1 | egrep... (1 Reply)
Discussion started by: raghunsi
1 Replies
8. Shell Programming and Scripting
Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly.
When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances... (4 Replies)
Discussion started by: edenCC
4 Replies
9. Programming
Hello Groups
I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records.
if we loop it in both the structures it is going to consume time.
I am looking for a simple... (3 Replies)
Discussion started by: dhanamurthy
3 Replies
10. Shell Programming and Scripting
Hi,
I was hoping someone would be able to help me out. I've got a Python script that I need to run 60 times concurrently (with the number added as an argument each time) via nightly cron. I figured that this would work:
30 1 * * * for i in $(seq 0 59); do $i \&; done
However, it seems to... (4 Replies)
Discussion started by: ckhowe
4 Replies