10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
Is there a special positional variables for when using the dot (.)?
Scripts are as below:
$: head -100 x.ksh /tmp/y.ksh
==> x.ksh <==
#!/bin/ksh
#
. /tmp/y.ksh 1234 abcd
echo "yvar1 = $yvar1"
echo "yvar2 = $yvar2"
==> /tmp/y.ksh <==
#!/bin/ksh (2 Replies)
Discussion started by: newbie_01
2 Replies
2. UNIX for Beginners Questions & Answers
Based on arguments passing in command prompt values should fetch and store in new file.
Sample:-
sh test.sh 10 30 35 45
cat test.sh
..
cut -c $1-$2,$3-$4 file_name >> file_new
...
...
Above sample passing 4 arguments.. but it may differ (sh test.sh 10 30 35 45 70 75 ) based on... (1 Reply)
Discussion started by: Jairaj
1 Replies
3. Shell Programming and Scripting
Hi, I'm working on HP-UX B.11.23 64bit. I tried to tar couple of directories but failed to do so.
$ tar -cvf tar_file_name -C /dir1 /dir2
the -C is for directories as mentioned in the man pages. But still unable to create a tar file having directories and sub-directories.
Requesting help in... (1 Reply)
Discussion started by: sam_bd
1 Replies
4. Shell Programming and Scripting
Hello, I have a series of files in sub-directories that I want to loop through, process and name according to the input filename and the various parameters I'm using to process the files. I have a number of each, for example file names like AG005574, AG004788, AG003854 and parameter values like... (2 Replies)
Discussion started by: bdeads
2 Replies
5. Shell Programming and Scripting
Hello friends,
I have a boubt passing different arguments at a time for any one option in below code.
I would also like to check which option has been selected (any one of i, r, u ) so that whether or not matching argument passed can be verified.
for i and r - install and re-install -... (4 Replies)
Discussion started by: pd2
4 Replies
6. Red Hat
Dear experts,
I have to take back up of 1.8TB data in single cmd. I have tape which has the capasity of 600 GB. Hence i want to use multiple tapes to take the backup using tar cmd.
Kindly help.
-Anand (8 Replies)
Discussion started by: nithyanandan
8 Replies
7. Shell Programming and Scripting
Hello,
I have a shell script "Test.ksh" and I need to pass 8 parameters/arguments while executing the script
./Test.ksh 1 2 3 4 5 6 7 8
Out of these I want first 3 to be compulsory and rest 5 to be optional. Can you suggest the way to do this like and also how to pass these optional... (3 Replies)
Discussion started by: indrajit_u
3 Replies
8. Shell Programming and Scripting
Hi there, i have been working on a backup script and have it just about working, the only problem im left with is that my filenames for my backups are all the same are replacing one another when backing up.
currently i have
BACKUP_FILE=backup_$(date +%d%m%y).tgz
but would like something like... (2 Replies)
Discussion started by: Swinton
2 Replies
9. UNIX for Dummies Questions & Answers
I have a problem where tar is somehow creating duplicate filenames when tarring a directory. Doing an ls on the directory does not show any duplicate filenames, yet when the directory is tarred, you can see that there are duplicates:
bash-2.03# pwd
/var/log/cricket
bash-2.03# ls -1 | sort |... (2 Replies)
Discussion started by: dangral
2 Replies
10. Answers to Frequently Asked Questions
A good place to start is simple variable passing....
Passing variables from one script to another
The next level is passing a variable into a more complex command such as using a variable in a sed command. There are some simple quoting techniques that are very general. These are mentioned... (0 Replies)
Discussion started by: Perderabo
0 Replies