10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Dear Forum members,
I am having trouble getting the complete filename (and directory path) in a variable.
Output directory mentioned in the code have three files:
DISPLAY_CITY_DETAILS_15-05-2019-08-29-26_MIGRATE_london.out
DISPLAY_CITY_DETAILS_15-05-2019-08-29-26_MIGRATE_paris.out... (4 Replies)
Discussion started by: chetanojha
4 Replies
2. Shell Programming and Scripting
Hi All,
Seeking for your assistance on how to put in variables all the commands in /bin
config files: /home/test/config_file/config.cfg
cat /home/test/config_file/config.cfg
ECHO=/bin/echo
LS=/bin/lsMain script
cat test.sh
source=/home/test/config_file/config.cfg
ECHO=$ECHO
LS=$LS#i... (3 Replies)
Discussion started by: znesotomayor
3 Replies
3. UNIX for Dummies Questions & Answers
Probably a stupid question... how do I use a wildcard in a variable in zsh? If I do:
var=*
echo $var
in bash, it will print all files/directories in the current directory. If I do it in zsh, it will only output an asterisk without the wildcard functionality. Thanks in advance! (1 Reply)
Discussion started by: RainbowLAr
1 Replies
4. Shell Programming and Scripting
Hey guys, i have got a problem...zenity is not being able to read my variables in its radiolist options.
as zenity needs a FALSE in front of a radiolist options, i have decided to ...
op=$(awk '{print "FALSE" " " $2} /etc/fstab)
$?=$(zenity --list --text "mount" --radiolist --column... (1 Reply)
Discussion started by: dplate07
1 Replies
5. Shell Programming and Scripting
I'm a newbie here, today I've got a problem. Here's the shell:
b.sh
#!/bin/bash
rm -rf $1
a.sh
#!/bin/bash
for file in '/root/Desktop/test/*'
do
echo $file
sh ./b.sh $file
done
ls /root/Desktop/test
When I sh a.sh, the result is : (2 Replies)
Discussion started by: very.very.sorry
2 Replies
6. Shell Programming and Scripting
i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Discussion started by: sw@pnil
1 Replies
7. Shell Programming and Scripting
Hi All,
I'll get a file whose 2nd line contains 3 fields: filename(variable length), file size char(10), and record count int(10). How do I cut it and put it into 3 variables?
eg: abcd.csv01234567891111111111
now I want: $one = abcd.csv, $two = 0123456789, $three = 1111111111.
I also... (8 Replies)
Discussion started by: Mandab
8 Replies
8. Shell Programming and Scripting
Hello
i am trying to use the wildcards with the if statement but it is displaying the error like this one
if * | ** | * ]
Any body can help me to for using the wild card option in the if case but i have used this code and working well with the case statement to enter the name without the... (14 Replies)
Discussion started by: murtaza
14 Replies
9. Shell Programming and Scripting
How to put a line of strings (with some white spaces in between) from a file into variables?
I have tried the following codes. However, the content is cut by space (not by line)
for i in `cat ${source_file}`
do
echo $i
done
Please comment. Thanks. (2 Replies)
Discussion started by: Rock
2 Replies
10. Shell Programming and Scripting
Normally you would have something like..
if
then
foo bar
fi
but what if you wanted to do something like
if
then
foo bar
fi
How do I get Unix to accept anything that matches a pattern of FILENAME with anything after it during an in if statement? (3 Replies)
Discussion started by: LordJezo
3 Replies