10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My question is basically as the title says. How can I check a user inputted string is only certain characters long (for example, 3 characters long) and how do I check a user inputted string only contains certain characters (for example, it should only contain the characters 'u', 'a', 'g', and 'c')... (4 Replies)
Discussion started by: Eric1
4 Replies
2. Shell Programming and Scripting
Hi. I'm trying to learn sed. I want to limit the length of a string. I tried this:
sed -n 's/^\(...........................\).*/\1/p' textfile.txt This works fine, but how do I give it as a range rather than putting a hundred dots?
I'd like to limit the number of characters to 144 for... (3 Replies)
Discussion started by: troglodytes
3 Replies
3. UNIX for Dummies Questions & Answers
Hey guys and gals,
Working on a script to limit the reoccurrance of characters in a line.
sed "/\(.\).*\1/d" -i file.txt
sed "/\(.\).*\1.*\1/d" -i file.txt
sed "/\(.\).*\1.*\1.*1/d" -i file.txt
..
To limit character reoccurance with 1x, 2x, 3x etc.
However I would like to be able to... (2 Replies)
Discussion started by: TAPE
2 Replies
4. AIX
Hello,
Sorry for my poor English.
I have to reduce rights for a user on AIX system so that:
When he does , he find in output, only filesystems on which he has permissions
.He can't do to change user.
Very thanks for helping. (2 Replies)
Discussion started by: edosseh
2 Replies
5. Programming
Is there any stabdard limitation on size of a code line in C code?
I am interesting in UNIX limitation, particulary on SUN.
Thanks! (8 Replies)
Discussion started by: alex_5161
8 Replies
6. HP-UX
Hello everyone.
I am trying to set up a monitor based on a "top" command statistic as follows:
top -bc -n1 > output.txt
I've put this command into a small script which is called by a cron... but there is something strange happening: the cron is limiting the output to output.txt to 80... (3 Replies)
Discussion started by: MartinF
3 Replies
7. Shell Programming and Scripting
I am trying to use the following code:
awk '{s=$0;if(length(s) < 750){getline; s=s " " $0}printf("%s\n",s)}' filename
but an error shows that 'awk' is too long. Is there a limit to the awk length function? and what could be an alternate solution for long fixed width records?
The code... (3 Replies)
Discussion started by: CKT_newbie88
3 Replies
8. Cybersecurity
Hello,
I am currently trying to limit incoming UDP length 20 packets on a per IP basis to 5 a second using IPTables on a Linux machine (CentOS 5.2).
Basically, if an IP is sending more than 5 length 20 UDP packet a second to the local machine, I would like the machine to drop the excess... (1 Reply)
Discussion started by: tomboy123
1 Replies
9. UNIX for Dummies Questions & Answers
Hi!
Can you please help me with one question?
Does rexec command have some limitation of the length of the deliveded cmd?
Thanks in advance,
Anta (2 Replies)
Discussion started by: Anta
2 Replies
10. Shell Programming and Scripting
Hi Friends,
I am having a funny problem with grep. When I run
grep 'expr' file.txt
things work fine. But when try to get the line number using the -n option, i.e,
grep -n 'expr' file.txt
I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded."
If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies