10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, there!
I am trying to pass an awk variable into a shell command in order to collect the result into an awk variable; in Bash it does work, as in:
v='2'; date -d "now + $v weeks"
But in awk it does not, as in:
v="2"
"date -d 'now + v weeks'" | getline newdate
close ("date -d 'now... (3 Replies)
Discussion started by: fbird3
3 Replies
2. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
3. Solaris
I'm posting here as it didn't seem quite right in the hardware section (as it's LOM commands). My apologies if I have that wrong though :)
I've finally gotten round to configuring the LOM on my Netra X1, but I can't get it to change the hostname via the "set" command:
lom>show hostname... (2 Replies)
Discussion started by: Smiling Dragon
2 Replies
4. Shell Programming and Scripting
Hello All,
I have a bash script and in it at some point I call an Expect Script that does some stuff and saves its
output in a ".txt" file.
Example "/path/to/my/file/Expect_Output.txt" file: notice the 2nd line is empty in the file...
Data for Host-1 (192.168.1.110)
Checking the... (2 Replies)
Discussion started by: mrm5102
2 Replies
5. Shell Programming and Scripting
Hi,
I have a snippet like below.
Based on variable i, i wish to print 1,2,3,4,5th columns to Sample files.
For each loop, one column from contetn and results will be pused to sample files. But i have a problem here
i=1
while ; do
`awk -F"\t" '{print $($i)}' $content > Sample_${i}_original`;... (4 Replies)
Discussion started by: forums123456
4 Replies
6. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
7. Shell Programming and Scripting
Hi all,
I am new to Linux/shell scripting having moderate knowledge.
In my script, I need to get execution time of a command (say 'ls') in mili seconds level. For this i tried using "time" command to retrieve the total execution time in milli seconds. But, the problem is that, how to save... (9 Replies)
Discussion started by: happening_linux
9 Replies
8. Shell Programming and Scripting
Hello:
Any bash PS1 gurus in the house?
I have a custom 2-line prompt and it displays fine, but there is an occasional anomaly.
The backspace key sometimes takes out the 2nd line.
Here's the relevant ~/.bashrc code:
MKF='This is my Kung-Fu'
DOS='C:${PWD//\//\\\}>'
PS1="\$MKF\n\\"
... (0 Replies)
Discussion started by: Habitual
0 Replies
9. Shell Programming and Scripting
I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3"
command1 -a -b c.txt | command2 -d -e $OPTION >result.txt
I want to do it that way because OPTION may be... (1 Reply)
Discussion started by: KenJackson
1 Replies
10. Shell Programming and Scripting
Hi guy,
I have a problem to pass a variable containing '*' value to FIND command.
below is the script. It doesn't work by submit below command:
rmf.sh name '*.txt'
or
rmf.sh name *.txt
I've tried either optn="-name '$2'" or optn="-name $2"., and there is no luck.
### (script... (5 Replies)
Discussion started by: unxuser
5 Replies