Search Results

Search: Posts Made By: haukee
3,669
Posted By haukee
Directing cat or grep command in variable
Hi,

I still have the problem with directing information from cat or grep to a variable.

For instance:
XMSG "$(date +%Y_%m_%d)_error_report.txt" "$(cat "$(date +%Y_%m_%d)_error_report.txt")"...
1,592
Posted By haukee
works! thx! :b:
works! thx! :b:
1,592
Posted By haukee
Well, I misunderstood the -p "". So it is just...
Well, I misunderstood the -p "". So it is just "read variable".

read variable
would just use the input as the new variable

But I still don't get why
case $(read variable)
does not work.
...
1,592
Posted By haukee
Thx for ur reply! Unfortunately it is not...
Thx for ur reply!

Unfortunately it is not working like I want it to...

#case $(read -p "" datacheck) in
#1) echo "yes" ;;
#2) echo "no" ;;
#*) echo "wrong";;
#esac

the answer is alway...
1,592
Posted By haukee
Case structure combined with standard input
Hi folks,

I am new to bash scripting so please excuse my question.

Is there any chance to combine a case structure with the read command?

Like

case (read -p "" variable) in
x)


Thx!
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 03:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy