06-12-2003
Go to a command prompt and actually type in the command wc -l coshb.txt and you'll understand why..
You could substitute this:
fil_len=`wc -l < coshb.txt | awk '{print $1}'`
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
My script prints a few varibales as each it reads each line of a text file and then prints them on screen, however iam having problem in aligning and sorting them.
what happens is this
Last First Number
Mark leo 87798798... (1 Reply)
Discussion started by: shackman66
1 Replies
2. Shell Programming and Scripting
I am modifying an existing script and it has the following line:
export SomeEnvVar=`echo ${SomeLocalVar}`
Why wouldn't it just read:
export SomeEnvVar=${SomeLocalVar}
Is there some reason to use echo instead of a direct assignment? :confused: (2 Replies)
Discussion started by: shellburger
2 Replies
3. Shell Programming and Scripting
whats the value stored in $$ (2 Replies)
Discussion started by: suri
2 Replies
4. Shell Programming and Scripting
Dear Friends,
I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll?
Example:
dcadd$cat components
1.Caluculator
2.Diary
...
...
50.Mobile
51.Battery
..
...... (12 Replies)
Discussion started by: baluchen
12 Replies
5. Shell Programming and Scripting
Hi
I am facing a strange problem
a=03
echo ${a}
the output is 3
But i want to display it is 03
Can you people help me how to display it like 03.
Thanks (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
6. Shell Programming and Scripting
Hi All,
I want to display content on command promt and also write in file.
For that iI ahve to write two sentence
echo "XXXXXXX"
echo "XXXXXXXX" >> 1.txt
Is there any way to write in one echo statement (1 Reply)
Discussion started by: vivek1489
1 Replies
7. UNIX for Dummies Questions & Answers
I've testing the following code:
echo test.txt | cut -d . -f1and get the output "text"
So why can't i assign the command to a variable?
VAR='"echo test.txt | cut -d . -f1"'
echo $VAR (5 Replies)
Discussion started by: jl487
5 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
What single command line would you enter to get the following output?
8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies
9. Shell Programming and Scripting
#!/bin/bash
varA="AAA1"
varB="BBB2"
varC="CCC3"
for proccx in $varA $varB $varC
do
echo "the current name is ????? , the value is $proccx"
echo " "
done
#end of script
I want the output to look something like this:
the current name is varA, the value is AAA1
the current name is... (5 Replies)
Discussion started by: ajp7701
5 Replies
10. Shell Programming and Scripting
lets say I am printing something out
echo "Please enter a valid username"
and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line.
Right now it keeps saying
Please enter a valid... (5 Replies)
Discussion started by: subway69
5 Replies
LEARN ABOUT CENTOS
systemd-getty-generator
SYSTEMD-GETTY-GENERATOR(8) systemd-getty-generator SYSTEMD-GETTY-GENERATOR(8)
NAME
systemd-getty-generator - Generator for enabling getty instances on the console
SYNOPSIS
/usr/lib/systemd/system-generators/systemd-getty-generator
DESCRIPTION
systemd-getty-generator is a generator that automatically instantiates serial-getty@.service on the kernel console /dev/console if that is
not directed to the virtual console subsystem. It will also instantiate serial-getty@.service instances for virtualizer consoles, if
execution in a virtualized environment is detected. This should ensure that the user is shown a login prompt at the right place, regardless
of which environment the system is started in. For example, it is sufficient to redirect the kernel console with a kernel command line
argument such as console= to get both kernel messages and a getty prompt on a serial TTY. See kernel-parameters.txt[1] for more information
on the console= kernel parameter.
systemd-getty-generator implements the generator specification[2].
Further information about configuration of gettys you may find in systemd for Administrators, Part XVI: Gettys on Serial Consoles (and
Elsewhere)[3].
SEE ALSO
systemd(1), agetty(8)
NOTES
1. kernel-parameters.txt
https://www.kernel.org/doc/Documentation/kernel-parameters.txt
2. generator specification
http://www.freedesktop.org/wiki/Software/systemd/Generators
3. systemd for Administrators, Part XVI: Gettys on Serial Consoles (and Elsewhere)
http://0pointer.de/blog/projects/serial-console.html
systemd 208 SYSTEMD-GETTY-GENERATOR(8)