Sponsored Content
Top Forums UNIX for Dummies Questions & Answers set varibale to be output of a command Post 302678979 by FUTURE_EINSTEIN on Monday 30th of July 2012 05:56:21 AM
Old 07-30-2012
Quote:
Originally Posted by Scott
Hi.

Use back-quotes.

i.e.
Code:
[Scotts-MBP:~] scott% echo $0
csh
[Scotts-MBP:~] scott% set X=`date '+%y'`
[Scotts-MBP:~] scott% echo $X
12
[Scotts-MBP:~] scott%

Thanks a lot this works!!!! Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

passing result of query to a varibale in ksh script

Hi, I have a scenario where in i have to extarct max of one column and pass it to a variable. i have tried to export the result as .dat file and read from that file.But my database is mainframe and it is not permitting me to export in .dat file.I have tried using .ixf file but reading from... (2 Replies)
Discussion started by: ammu
2 Replies

2. Shell Programming and Scripting

Varibale to NULL or ZERO

I have a variable called V_param1 and does it have some value. I want to check this varibale is NULL or Zero then exit else do How to incorported this in Script. any input (2 Replies)
Discussion started by: u263066
2 Replies

3. Shell Programming and Scripting

passing of a varibale to subshell

Hi All, I need some info. Could you please tell me how to use the variable of a parent shell in the subshell. Also can we modify the variable in the subshell ? If yes, will the modified variable visible in the parent shell I am using two prg. a.sh #!/usr/bin/ksh temp_var="abhishek"... (3 Replies)
Discussion started by: AbhishekG
3 Replies

4. Shell Programming and Scripting

How to use a varibale in sed

i wanna insert a row in a file. I m using this command to insert a row in the 13th line. sed '13i\ NewRow' MyFile > temp.txt mv temp.txt to MyFile this works fine. now i wanna get the line no using grep into a variable and then use tht variable to insert a new row.. how to do this wid... (8 Replies)
Discussion started by: St.Fartatric
8 Replies

5. Shell Programming and Scripting

Set specific part in command output into variable

I am trying unsuccessfully to set into a variable a specific part of command output: The command output will be as: line 1: <varied> line 2: 2 options: option 1: Set view: ** NONE ** or option 2: Set view: <different_name_of_views_always_without_spaces> and I would like to get into... (7 Replies)
Discussion started by: orit
7 Replies

6. Shell Programming and Scripting

set variable to command output

I'm hoping you guys can help me out here. I've been trying different methods to try and get what IW as hoping would be a fairly simple script but has turned into a pain. Bit of background - I am writing a script to check values in certain failes to ensure they are corerct. I'm runnign this on... (2 Replies)
Discussion started by: stuc
2 Replies

7. HP-UX

What is the use of command set -- and set - variable?

Hi, I am using hp unix i want to know the use of the following commands set -- set - variable thanks (4 Replies)
Discussion started by: gomathi
4 Replies

8. UNIX for Dummies Questions & Answers

set output delimiter as tab in cut command

I can not make it work, it prints \t rather than introduce tabs. cut -d "," -f 4,8 Samples.csv --output-delimiter="\t" | sort > out Since I am running this command within a shell script, I tried manually inserting tab in this command, still does not work. I am using bash shell Suggestions... (8 Replies)
Discussion started by: analyst
8 Replies

9. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

10. Shell Programming and Scripting

How to pass IF condition via shell varibale in awk?

Hello, I have one query regarding passing IF condition shell variable inside awk. Here is the case- File content of keydefn.exp 201~2~LM Limit 02-current value~Limit 02 ~Limit02~Current~Value ~N~Y~S~0~9999999 201~3~LM Limit 03-current value~Limit... (2 Replies)
Discussion started by: anillambait
2 Replies
kbackup(1)						      General Commands Manual							kbackup(1)

NAME
kbackup - An easy to use backup program VERSION
0.7 DESCRIPTION
Kbackup is a program that lets you back up any directories or files. It uses an easy to use directory tree to select the things to back up and lets you save your settings in "profile" files. These are simple textfiles containing definitions for directories and files to be included or excluded from the backup process. USAGE
Usage: kbackup [Qt-options] [KDE-options] [profile] APPLICATION OPTIONS
Generic options: --help Show help about options --help-qt Show Qt specific options --help-kde Show KDE specific options --help-all Show all options --author Show author information -v, --version Show version information --license Show license information Arguments: profile Start with given profile Options: --script <file> Script to run after finishing one archive slice --auto <profile> Automatically run the backup with the given profile and terminate when done. --autobg <profile> Automatically run the backup with the given profile in the background (without showing a window) and terminate when done. --verbose In autobg mode be verbose and print every single filename during backup --forceFull In auto/autobg mode force the backup to be a full backup instead of acting on the profile settings AUTHORS
Kbackup was written by Martin Koller <kollix@aon.at>. This man-page was created by Scott Kitterman <scott@kitterman.com> and is licensed under the same terms as kbackup. 2010-07-13 kbackup(1)
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy