10-31-2006
separate information with a space character
Hi,
I would like to display a sorted list (based on the login name) of the login name, the home directory and the default shell of each user defined on the system ;
I just do
cut -d: -f1,6,7 /etc/passwd | sort
And then I would like to separate each information with a space character.
I had the idea to use the Outpud Field Separator as I use with awk but no way .
How could I like this space with this command ?
thanks .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose u have a file
P2122 AAJJSKKSKSLSKSKMSKMS
P2123 AASSJMWJNSJNWHNSKSJ
P2126 AHJMKNSAJNSKAKMOKALM
P3533 KKKSJMAKKLLMLMSLMSPM
P2122 JKKSKKMKKSKKKS--------------NSNJ
P2123 NSJN---------MSKMKMKKSLLNSLL
P2126 JNJSJNWKMSK-------------SKKSMK
P3533 JSNSNPWLLL-SKK----SKKKSKKS
so the... (2 Replies)
Discussion started by: cdfd123
2 Replies
2. AIX
i want a command for my script!!!
say file consists of character 123 125 127.
i need a query to replace the number 2 with 0
so the output should be 103 105 107.
i use unix-aix (8 Replies)
Discussion started by: rollthecoin
8 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a file with User ID and User Name. Sometimes the file has speical characters in the USer ID and it creates problems.
I want to allow all those fields to be processed which have only numbers and characters.
I do NOT want to process those fields with Speical Characters.
How... (1 Reply)
Discussion started by: baanprog
1 Replies
4. Shell Programming and Scripting
hi all,
i want to delete a space character in word on unix script with command sed like :
#dia n
result:
#dian
is there anyone will help me ?
regards,
cahyo (1 Reply)
Discussion started by: cahyo3074
1 Replies
5. Shell Programming and Scripting
Hi guys,
I am new to shell scripting and I have a small problem...If someone can solve this..that would be great
I am trying to form a XML by reading a flat file using shell scripting
This is my shell script
LINE_FILE1=`cat FLEX_FILE1.TXT | head -1 | tail -1`
echo... (1 Reply)
Discussion started by: gowrishankar05
1 Replies
6. Shell Programming and Scripting
Hi Experts,
How to sepearate the list digit with letters : with a space from where the letters begins, or other words from where the digits ended.
file
52087mo(enbatl)
52049mo(enbatl)
52085mo(enbatl)
25051mo(enbatl)
The output should be looks like:
52087 mo(enbatl)
52049... (10 Replies)
Discussion started by: rveri
10 Replies
7. Shell Programming and Scripting
Hi,
I have following regex condition, however it does not work with different logs having same visible string.I believe it is because of some difference with space character, is it possible to make it work everywhere.
Can someone suggest a better string?
/BIND dn=" uid=/
Thanks. (8 Replies)
Discussion started by: susankoperna1
8 Replies
8. Solaris
While getting the total disk space in solaris machine using df -k command, i am getting the same disk info for every user available in that system.
Is there any way to remove it.
Filesystem 1024-blocks Used Available Capacity Mounted on
rpool/ROOT/solaris 573898752... (3 Replies)
Discussion started by: prasankn
3 Replies
9. Programming
performing this code to read from file and print each character in separate line
works well with ASCII encoded text
void
preprocess_file (FILE *fp)
{
int cc;
for (;;)
{ cc = getc (fp);
if (cc == EOF)
break;
printf ("%c\n", cc);
}
}
int
main(int... (1 Reply)
Discussion started by: khaled79
1 Replies
10. Shell Programming and Scripting
Hi friend,
I have one file , and i want to read that file character by character.
I need this script in ksh.
while using read option with -n1 am getting error.
while read -n1 c read has bad option
And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies