Search Results

Search: Posts Made By: Xubuntu56
878
Posted By rbatte1
Be very careful with using this because if there...
Be very careful with using this because if there are filesname with spaces, tabs or other non-printing characters, it might break again.

You might be better to use find instead:-find . -name "*d*"...
878
Posted By vbe
Folders would be seen as files with execute...
Folders would be seen as files with execute perms, so the question is more are those "folder" true folders or files, because files dont necessarily need execution perms, but it gets more tricky when...
878
Posted By vgersh99
man test yields: -x FILE ...
man test yields:

-x FILE
FILE exists and execute (or search) permission is granted

Is folders a directory?
What are its permissions?
1,409
Posted By bakunin
Yes, either that or try my little introduction...
Yes, either that or try my little introduction (https://www.unix.com/shell-programming-and-scripting/280050-selection-array.html) to select.

I hope this helps.

bakunin
1,409
Posted By nezabudka
I do not know how much it is correct. it works...
I do not know how much it is correct. it works even like that
COLUMNS=100000

--- Post updated at 18:01 ---

I foresee your next question.
How to change prompt #?
PS3="which menu item we...
1,409
Posted By apmcd47
select appears to take note of the LINES and...
select appears to take note of the LINES and COLUMNS variables set on terminal resize. Try adding COLUMNS=0into your code prior to the select statement.

Andrew
954
Posted By stomp
It does not write once. It writes continously...
It does not write once. It writes continously without break the same 5 lines into hist5 file over and over and generates considerable load at your machine. Since every session has its own history...
1,778
Posted By stomp
Ubuntu should have rename(a perl script)...
Ubuntu should have rename(a perl script) available and installed:


rename 's/(.*).tex.txt/$1.txt/' *.txt
1,778
Posted By apmcd47
bash: for f in *.tex.txt do mv ${f}...
bash:
for f in *.tex.txt
do mv ${f} ${f/.tex/}
done

More Posix compliant (I believe):
for f in *.tex.txt
do mv ${f} ${f%.tex*}.txt
done

Andrew
1,645
Posted By MadeInGermany
Yes, by default stdout and stderr go to the...
Yes, by default stdout and stderr go to the terminal but in different streams.
Each of them can be redirected to an individual target, then they are separatate.
Say you run a script with...
1,645
Posted By RudiC
It does not. You need to differentiate between...
It does not. You need to differentiate between "by default" and "by habit" here. With your interactive sessions, you have both pointing to your terminal by habit. But running a command or script may...
1,645
Posted By rbatte1
I use another form in a way too:-echo "This is my...
I use another form in a way too:-echo "This is my debug message" >&2This way, I can write my own messages to the standard error file (or indeed any other file descriptor I choose to define) which are...
1,669
Posted By Scrutinizer
With regards to pattern matching, perhaps a finer...
With regards to pattern matching, perhaps a finer point to be made here is that (standard) globbing, or glob pattern matching, is a special form of pattern matching, where patterns are used for...
1,669
Posted By RudiC
In your post, you're not "grepping filenames",...
In your post, you're not "grepping filenames", but grepping text that is the result of an ls command, containing file names.


As you pointed out, you need to differentiate between "grepping and...
1,669
Posted By MadeInGermany
Normally ls lists the contents of a given...
Normally ls lists the contents of a given directory.
Say there would be a pax/ subdirecory beside the partx file,
ls p*a*x would list partx and the contents of the pax/
While ls -d p*a*x would...
1,669
Posted By Scrutinizer
Not really related to the question, but: ls -d...
Not really related to the question, but:
ls -d p*a*x
1,669
Posted By stomp
Try this... ls | grep "^p.*a.*x$".* is for any...
Try this...
ls | grep "^p.*a.*x$".* is for any character, 0 to any number of occurrances.

So the task is to create one combined regular expression that matches all criteria you want.
1,669
Posted By bakunin
You are right and there is - in fact there are...
You are right and there is - in fact there are two ways:

First, you can use several expressions in grep at once by using the -e-switch:

grep -e "one" -e "two" /some/file

will list all lines...
8,751
Posted By nezabudka
then look at this option as well. The program...
then look at this option as well.
The program will go into all pages one after one.
matching this pattern
man --names-only --regex '^an'
pressing one by one 'q' and 'Enter'
8,751
Posted By nezabudka
man -w --names-only --regex '^a'
man -w --names-only --regex '^a'
8,751
Posted By stomp
man -k searches in more than the mere man page...
man -k searches in more than the mere man page name.

Maybe man -k . | grep -E '^a' is more helpful.

Besides: a* matches to anything, it can be an empty string.
8,751
Posted By vgersh99
how about man -k a*
how about man -k a*
1,645
Posted By vbe
Well most common use of redirection is more...
Well most common use of redirection is more redirecting STDERR to STDOUT:
ls -al . >ls.out 2>&1
I tend to keep both separate specially when using cron, as if in a rush, if you redirect all to...
1,645
Posted By MadeInGermany
I think the following example makes more sense. ...
I think the following example makes more sense.
# Save the stderr destination in descriptor 9 then let stderr point to errorlog file
exec 9>&2 2>errorlog
command1
command2
# Restore stderr
exec...
1,645
Posted By bakunin
Not quite. Picture a UNIX process as a sort-of...
Not quite. Picture a UNIX process as a sort-of garden hose for data: you pour something in on the top and something rins out at the bottom. So far, it should be quite clear. Now, where the UNIX...
Showing results 1 to 25 of 81

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