10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need somebody who could help with an exercise.
You have a text file called users.txt with this info inside:
users.txt:
user1:1234:/home/homedir1 ;
user2:1234:/home/homedir2 ;
user3:1234:/home/homedir3 ;
user4:1234:/home/homedir4 ;
The script should create an user using the... (2 Replies)
Discussion started by: marcosruiz
2 Replies
2. Shell Programming and Scripting
whether it is possible in awk to create your own header file like in C
if so someone give me awk equivalent for below one
$ cat foo.h
int add(int a,int b)
{
return(a+b);
}
$ cat main.c
#include<stdio.h>
#include"foo.h"
void main()
{
int number1=10,number2=10,number3;
number3 =... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
I am not experienced with Unix, so please dont mind if the question seem to be irrelevant.
I have written a simple script, that connects DB & fetches few records from a table. I wanted to get those details as file in .CSV format via mail.
-I stored the query o/p in a file.
-I... (6 Replies)
Discussion started by: sumitburnwal88
6 Replies
4. Shell Programming and Scripting
first i created a profile file(my_var.profile) which contains
export my_var=20
after that i created shell scripts(my_var.sh) which contains
#!/bin/bash
. ./my_var.profile
echo '$my_var='$my_var
but when i am executing sh my_var.sh it is showing error that no such file/directory .profile.... (6 Replies)
Discussion started by: pratikjain998
6 Replies
5. Shell Programming and Scripting
I am new in shell scripting. currently i am using cygwin. My problem is
i created a profile file in my own folder. file name is first.profile in which i gave following values to variable
export a=10
now i am executing this profile file by below command
./.first.profile
it executed... (4 Replies)
Discussion started by: pratikjain998
4 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I was trying to create pxelinux.cfg/default file in a script that I use for creating backup of bootimage.
cat 2>${BACKUB_BOOTIMAGE_ERRINFO} >${pxelinux_cfg_file} <<EOF
prompt 1
timeout 0
display boot.msg
label restore
kernel kernel
append root=/dev/nfs... (0 Replies)
Discussion started by: Pkumar Sachin
0 Replies
7. Shell Programming and Scripting
Hello,
I have a file seperated with "|" I want to search the 11th field if it matches certain words change it to an empty space.
I have managed to do that, but now I need it to replace the file.
this is my code:
awk 'BEGIN{OFS=FS="|"}$11=="to... (9 Replies)
Discussion started by: TasosARISFC
9 Replies
8. Shell Programming and Scripting
I have to create a single file from three files, Please see below for samples:
day.txt
20090101
20090102
item.txt
123456789101
12345678910209
1234567891
str.txt
1
12
123
output.txt
20090101123456789101 1 0
2009010112345678910209 12 ... (2 Replies)
Discussion started by: tamahomekarasu
2 Replies
9. Shell Programming and Scripting
Hi, I am trying to create sql statements from a file, but I have a problem with ':
This is what I do:
cat filex.txt | awk -F: '{print $1,"A","and personnavn like",$5}' | sed -e "s/^/select bruker.brukernavn, person.personnavn from bruker, person where brukernavn like '/" -e "s/$/' and... (2 Replies)
Discussion started by: hannem
2 Replies
10. Shell Programming and Scripting
Hi All
I am trying to create a csv file in the korn shell and the script segment is as follows:
if
then
# NEED TO ADD INFO TO THE EMAIL FILE ABOUT THE DRIVE THAT'S FILLING UP
echo "$drive $percent% $space "|\
awk '{printf("%d/t"|"%d/t"|"%d/t\n",... (6 Replies)
Discussion started by: Segwar
6 Replies