Search Results

Search: Posts Made By: forever_49ers
9,743
Posted By forever_49ers
store awk results in a variable
I try to get the month (of last save) and the filename into a variable, is this possible ?

something like this :

for month in `ls -la | awk '{print $6}'`
do

if [[ $month == "Sep" ]]
...
251,655
Posted By forever_49ers
thats way better, thanks Steffen
thats way better, thanks

Steffen
251,655
Posted By forever_49ers
that did not work. ex: command not found ...
that did not work.

ex: command not found

Steffen
251,655
Posted By forever_49ers
thanks, you mind explaining your code for...
thanks,

you mind explaining your code for me, since I am not quite sure what it does

thanks a lot
Steffen
251,655
Posted By forever_49ers
delete line in file with sed
sed "/$titlesearch/d" movielist

will delete any line in the file movielist that matches $titlesearch, but this is only a screen print correct ?

how can I have sed to actually delete the line...
2,363
Posted By forever_49ers
you mean quit) exit ;; esac ...
you mean

quit)
exit
;;

esac
done
;; # here ?!?
# program works up to here

# if I choose any of the options below I get an error message "syntax error near unexpected token ')'...
4,513
Posted By forever_49ers
what change would that be ? I have multiple...
what change would that be ? I have multiple matching tags in another file ?

thanks,
Steffen
2,363
Posted By forever_49ers
stacking case options
possible to stack case commands ? I get an error, s. comments below

select choice in search delete quit
do

case $choice in
search)

select option in title director year
do
...
7,469
Posted By forever_49ers
"The function should be defined before it is...
"The function should be defined before it is called"

by doing what?

Steffen
7,469
Posted By forever_49ers
function call
can I call a function in bash script just as in C++

while
do

function()

done


function()

thanks,
Steffen
2
awk
1,523
Posted By forever_49ers
you guys are awesome, thanks a lot :cool: ...
you guys are awesome, thanks a lot :cool:

Steffen
2
awk
1,523
Posted By forever_49ers
awk
here I am again :)

i ran this awk command :

awk -F ';' '/mummy/{print $1}' movielist

and I got the desired result (the mummy) from the file (movielist)

I also ran

awk -F ';'...
22,676
Posted By forever_49ers
I don't know this function, will take a look at...
I don't know this function, will take a look at it

thanks,
Steffen
22,676
Posted By forever_49ers
I know that, but I have a user input variable as...
I know that, but I have a user input variable as the search string, I cannot alter the variable to [Aa][Bb][Cc].....

Steffen
22,676
Posted By forever_49ers
I know I cannot use IGNORECASE for only certain...
I know I cannot use IGNORECASE for only certain commands, only globally.

I didnt want to IGNORECASE anyway. My problem is that I have to look for a match in a file using awk and the search string...
22,676
Posted By forever_49ers
awk case-insensitive
can I tell awk to be case insensitive for one operation without setting the ignorecase value ?

thanks,
Steffen
4,757
Posted By forever_49ers
yup, did that, just posted a happy face cause it...
yup, did that, just posted a happy face cause it worked :D

thanks,
Steffen
4,757
Posted By forever_49ers
:D thanks Steffen
:D

thanks
Steffen
4,757
Posted By forever_49ers
this works for the first 4 menu options, the menu...
this works for the first 4 menu options, the menu will reappear.

However, I also have a fifth menu option Quit which is supposed to end the program, but now even if I choose option quit it will...
4,513
Posted By forever_49ers
awesome, thanks. Since I am new to this,...
awesome, thanks.

Since I am new to this, would it be possible to explain what this command does step by step ?

thanks
Steffen
4,757
Posted By forever_49ers
thanks, but that still only prompts me #? instead...
thanks, but that still only prompts me #? instead of the menu list again

Steffen
4,513
Posted By forever_49ers
while loop from list
is it possible to run a while loop by comparing a variable with a list ?

taglist="<html> </html> <head> </head> <body> </body> <p> </p> <ul> </ul> <li> </li> <em> </em> <title> </title>"

read...
4,757
Posted By forever_49ers
reappearing menu list using select
is there a way I can make the menu list reappear when I use select ?

-----

menulist="Change_title Remove_tag Change_tag Add_line Quit"

select word in $menulist #change_title remove_tag...
Showing results 1 to 23 of 23

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