8 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
2. UNIX for Dummies Questions & Answers
hay
i am trying to get JUST the PID from the ps command.
my command line is:
ps -ef | grep "mintty" | cut -d' ' -f2
but i get an empty line. i assume that the delimiter is not just one space character, but can't figure out what should i do in order to do that.
i know i can use awk or cut... (8 Replies)
Discussion started by: ran ber
8 Replies
3. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
4. Shell Programming and Scripting
Hello,
I want to get the User Name details of a user from a file list.
This list can be in the format:
FirstName_MiddleName1_LastName_ID
FirstName_LastName_ID
FirstName_MiddleName1_MiddleName2_LastName_ID
What i want it to return is FirstName_MiddleName1_LastName of a user.
I... (6 Replies)
Discussion started by: limamichelle
6 Replies
5. Shell Programming and Scripting
n2=user1 pts/3 2010-06-29 01
Now i want to split this string with space(' ') character.
After splitting output would be:
use1
pts/3
2010-06-29
01
I did:
nn=${n2} | cut -d ' ' -f2
echo ${nn}
It prints nothing.
I want the output:
pts/3 (2 Replies)
Discussion started by: cola
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
tmp=`stat -c "%a %n" $APPLTMP`
printf "\n$tmp\n"
t1=`echo $tmp | cut -c 1-3`
printf "t1" $t1
tmp has the value 777 /podaai/applcsf/tmp
but t1 returns NULL string,
what needs to be corrected in this ? (2 Replies)
Discussion started by: happyrain
2 Replies
7. Shell Programming and Scripting
Hi,
I want to cut from a particular position to a particular position and retain the rest.
I tried this
cut -c31-51 file1.txt > file2.txt
But The characters from the position 31 to 51 were only present in file2.txt.
Is there a way to reverse this i.e to retain the rest except from... (1 Reply)
Discussion started by: ragavhere
1 Replies
8. Shell Programming and Scripting
I need to use the cut command with a variable.I have to select a few characters so I tried cut -c30-42 but how do I join it with variable x.
Thanks (1 Reply)
Discussion started by: aries
1 Replies