10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone,
I'm trying to write a small script to automatize row data treatment. However, I got some trouble with the awk command.
I want to use awk to extract a define paragraph from a text file. The first and final lines are defined externally in two variables called debut and fin.
I... (2 Replies)
Discussion started by: TeaTimeSF
2 Replies
2. Shell Programming and Scripting
Hello
I have found some piece of code to verify and then run shell script with root permission from normal user.
see : http://blog.mecworks.com/articles/2006/02/23/bash-scripting-tip-running-a-script-as-root
I have wrote two scripts using this tips.
- one to copy file from server to local... (6 Replies)
Discussion started by: jcdole
6 Replies
3. Shell Programming and Scripting
Hello,
I have a problem with a bash script, I've been doing recherches but i can't make it work. It is my first time with a dynamic variable and i don't understand how to write it.
#!/bin/bash
USER=BARSPIN
HOTKEYS_PATH="/home/$USER/Documents/bash/tibia/HOTKEYS"
CFG1="A"
CFG2="B"... (5 Replies)
Discussion started by: barspin
5 Replies
4. Shell Programming and Scripting
Hello I have to do a program in Bash, need help because it does not go out for me and go enough time with this!!
Five directories(boards of directors) that more occupy, arranged according to size. To measure the size of every directory(board of directors) there must not be included the size... (1 Reply)
Discussion started by: danihj
1 Replies
5. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
6. UNIX for Dummies Questions & Answers
hi all,
i want use the variable value as a new variable name. print output of new variable.
for i in COMPUTER1 COMPUTER2
do
flag_name=${i}_FLAG
eval ${flag_name}=123
echo $i'_FLAG'
done
output is
COMPUTER1_FLAG
COMPUTER2_FLAG
i need output as
123
123 (2 Replies)
Discussion started by: arvindng
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have a text file in which , I have contents like
t1=abc
t2=xyz
t3=awe
......
I am able to read contents of these variables in a script by
. /temp.txt
echo $t1
Now, what my requirement is something like this
a="t"
i=1
echo $a$i --->this is displaying t1 (3 Replies)
Discussion started by: kaaakrishna
3 Replies
8. Shell Programming and Scripting
Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
Discussion started by: arsidh
10 Replies
9. Shell Programming and Scripting
Hi All,
I need urgent help. Because just now i have to give this code to my client.
I have a folder name is Testing. this Testing folder contains the following 3 files.
1.txt
2.txt
2.txt
Now I want to store the first value of my folder in a variable say suppose $a.
Means i want that... (3 Replies)
Discussion started by: sunitachoudhury
3 Replies
10. Shell Programming and Scripting
Hi,
I have to write a program to compare 2 files for copying.
the program is ran on Solaris 5.8 like this:
script.sh file1.txt file2.txt
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I... (2 Replies)
Discussion started by: Chris Jones
2 Replies